**Source URL:** https://limited.veevavault.dev/quality/mdl/component-types/recordtrigger

# Recordtrigger

**Class:** `code`

Record triggers execute custom code when a record Event occurs.

Learn about [Record Triggers in Vault Help](https://platform.veevavault.help/en/lr/45776#record_triggers).

| Attribute | Metadata | Description |
| --- | --- | --- |
| `label` | Type: String Max length: 60 | UI-friendly string in the Vault's base language. |
| `active` | Type: Boolean | Indicates whether the component is active. |
| `checksum` | Type: String Max length: 1500 | Used to check data for errors. |
| `event_segment` | Type: Enum Allowed values: PRE\_CUSTOM; POST\_CUSTOM; UNSPECIFIED | For internal Veeva use only. This Enum is used for a variety of features in Vault. Contains valid values for specifying `eventSegment`. |
| `events` | Type: Enum Multi-value Allowed values: BEFORE\_INSERT; AFTER\_INSERT; BEFORE\_UPDATE; AFTER\_UPDATE; BEFORE\_DELETE; AFTER\_DELETE | The Events specifying when this record trigger executes. For example, `BEFORE_UPDATE` means the trigger executes right before the record updates. |
| `object` | Type: Component **Required** | The object this record trigger is associated to, for example,`product__v`. |
| `order` | Type: Enum Allowed values: NUMBER\_1; NUMBER\_2; NUMBER\_3; NUMBER\_4; NUMBER\_5; NUMBER\_6; NUMBER\_7; NUMBER\_8; NUMBER\_9; NUMBER\_10; UNSPECIFIED | 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: SdkCode Max 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

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

---

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