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

ParameterData TypeRequiredDescription
field_nameStringYesThe API name of the field to evaluate.
… new_valuesObjectYesOne 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.