TRIGGER_IS_CHANGED_TO
Description
Returns TRUE if the specified field's value has changed to any of the provided new values in the current trigger context; otherwise, returns FALSE.
Syntax
TRIGGER_IS_CHANGED_TO(field_name, ...new_values) -> Boolean
Parameters
| Parameter | Data Type | Required | Description |
|---|---|---|---|
| field_name | String | Yes | The API name of the field to evaluate. |
| … new_values | Object | Yes | One or more values to compare against the field’s new value. If the field was previously different and now equals one of the specified values, the function returns TRUE. |
Example
TRIGGER_IS_CHANGED_TO("Type", "Vendor", "Partner")
-- Returns TRUE if Type is changed to "Vendor" or "Partner"; otherwise, FALSE.