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

# Recordroletrigger

**Class: ** `code`

Record role triggers execute custom code whenever roles are directly (manually) added or removed from an object record.

Learn about <a href="https://platform.veevavault.help/en/lr/45776#record_role_trigger" target="_blank">Record Role 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:BEFOREAFTER | The Events specifying when this record role trigger executes. For example, BEFORE means the trigger executes right before the record role assignment. |
| object | Type: ComponentRequired | The object this record role 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 role trigger and code used to create and edit metadata. Custom means this record role 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:** [Recordmergeeventhandler](/safety/mdl/component-types/recordmergeeventhandler)  
**Next:** [Recordtrigger](/safety/mdl/component-types/recordtrigger)