**Source URL:** https://limited.veevavault.dev/clinical/mdl/component-types/recordroletrigger

# Recordroletrigger

**Class:** `code`

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

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

| 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; AFTER | The Events specifying when this record role trigger executes. For example, `BEFORE` means the trigger executes right before the record role assignment. |
| `object` | Type: Component **Required** | The object this record role 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 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

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

---

**Previous:** [Recordmergeeventhandler](/clinical/mdl/component-types/recordmergeeventhandler)  
**Next:** [Recordtrigger](/clinical/mdl/component-types/recordtrigger)