Skip to content

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:

  1. Log in to your Vault.
  2. Navigate to Business Admin > Objects and click into the vSDK Hello World object.
  3. On the object record list page, click Create to create a new vSDK Hello World object record.
  4. Enter your name in the Name field.
  5. Click Save. This triggers the BEFORE_INSERT event, which triggers the HelloWorld trigger 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!