Scoped GlideElement - changesTo(Object o)

Determines if the new value of a field, after a change, matches the specified object.

Note: The changesTo() 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
o Object An object value to check against the new value of the current field.
Table 2. Returns
Type Description
Boolean True if the previous value matches, false if it does not.
// The following example shows that in a business rule, if "active" field is changed to false, 
// insert a event in the EventQueue.
if (current.active.changesTo(false)) {
  gs.eventQueue("incident.inactive", current, current.incident_state, previous.incident_state);
}