Run a Record Trigger
In this step, you will:
- Run a sample record trigger in your Vault
- Understand the record event that triggered your trigger
The HelloWorld record trigger executes at the BEFORE_INSERT event on the vsdk_hello_world__c object. This means the trigger will execute custom code right before an object record is saved, and that this trigger only executes on vsdk_hello_world__c object records. All other objects would not trigger this record trigger.
When triggered, the custom code written for the HelloWorld trigger will set a value in the Description field on the triggering Vault object record.
To execute the HelloWorld record trigger:
- Log in
to your Vault. - Navigate to Business Admin > Objects and click into the vSDK Hello World object.
- On the object record list page, click Create to create a new vSDK Hello World object record.
- Enter your name in the Name field.
- Click Save. This triggers the
BEFORE_INSERTevent, which triggers theHelloWorldtrigger to add a value to the Description field before the record is saved. Once the record is saved, you should see the Description field was set to “Hello, {name}!”. That’s your record trigger in action!
Continued Learning
Section link for Continued Learning- Learn more about record triggers