Scoped GlideElement - changes()

Determines if the current field has been modified if the field is a reference, number, or string field.

This method does not detect changes to Journal fields.
Note: The changes() method is not supported within ACL scripts.
Note: If the GlideRecord on which you are performing this method has only been initialized and read, and has not been written, the underlying before-and-after values are the same. In this case, the method returns "false", as there has been no change to the data store.
Table 1. Parameters
Name Type Description
None
Table 2. Returns
Type Description
Boolean True if the fields have been changed, false if the field has not.
// This method is often used in business rules. The following example shows is from a business rule, 
// if "assigned_to" field value is changed, create a event in the EventQueue. 
if (!current.assigned_to.nil() && current.assigned_to.changes()) {
  gs.eventQueue('incident.assigned', current, current.assigned_to.getDisplayValue(), previous.assigned_to.getDisplayValue());
  }