**Source URL:** https://general.veevavault.dev/safety/mdl/component-types/recordtrigger.md

# Recordtrigger

**Class: ** `code`

Record triggers execute custom code when a record Event occurs.

Learn about <a href="https://platform.veevavault.help/en/lr/45776#record_triggers" target="_blank">Record Triggers in Vault Help</a>.

| Attribute | Metadata | Description |
| --- | --- | --- |
| label | Type: StringMax length: 60 | UI-friendly string in the Vault's base language. |
| active | Type: Boolean | Indicates whether the component is active. |
| checksum | Type: StringMax length: 1500 | Used to check data for errors. |
| event_segment | Type: EnumAllowed values:PRE_CUSTOMPOST_CUSTOMUNSPECIFIED | For internal Veeva use only. This Enum is used for a variety of features in Vault. Contains valid values for specifying eventSegment. |
| events | Type: EnumMulti-valueAllowed values:BEFORE_INSERTAFTER_INSERTBEFORE_UPDATEAFTER_UPDATEBEFORE_DELETEAFTER_DELETE | The Events specifying when this record trigger executes. For example, BEFORE_UPDATE means the trigger executes right before the record updates. |
| object | Type: ComponentRequired | The object this record trigger is associated to, for example,product__v. |
| order | Type: EnumAllowed values:NUMBER_1NUMBER_2NUMBER_3NUMBER_4NUMBER_5NUMBER_6NUMBER_7NUMBER_8NUMBER_9NUMBER_10UNSPECIFIED | If multiple triggers exist on the same object, this specifies the order this record role trigger will execute. Order 1 executes first and Order 10 executes last. UNSPECIFIED means this trigger will always execute last. |
| source_code | Type: SdkCodeMax length: 1048576 | The source of this record trigger and code used to create and edit metadata. Custom means this record trigger was developed with the Vault Java SDK. |

### Supported Operations {#supported-operations}

| Operation | Support |
| --- | --- |
| Create | No |
| Recreate | No |
| Alter | No |
| Drop | No |
| Rename | No |
| Describe | No |
| Generate Recreate | No |
| Queryable | Yes |


---

**Previous:** [Recordroletrigger](/safety/mdl/component-types/recordroletrigger)  
**Next:** [Recordworkflowaction](/safety/mdl/component-types/recordworkflowaction)