TRIGGER_IS_CHANGED_FROM

Description

Returns TRUE if the specified field's value has changed from any of the provided old values in the current trigger context; otherwise, returns FALSE.

Syntax

TRIGGER_IS_CHANGED_FROM(field_name, ...old_values) -> Boolean

Parameters

ParameterData TypeRequiredDescription
field_nameStringYesThe API name of the field to evaluate.
… old_valuesObjectYesOne or more values to compare against the field’s previous value. If the previous value matches any of the specified values and the new value is different, the function returns TRUE.

Example

TRIGGER_IS_CHANGED_FROM("Status", "New", "Pending")
-- Returns TRUE if Status changed from "New" or "Pending" to a different value in this transaction; otherwise, FALSE.