changes(), changesFrom() and changesTo()

The changes(), changesFrom(), and changesTo() methods of the GlideElement class are generally called from within business rules that run before or after a given database update is made. These methods return a boolean value indicating whether a field has changed at all, whether it's changed from a specified value, or whether it's changed to a specified value, respectively.

The changes() method does not accept any arguments. It doesn't need to, because it's being called from the GlideElement corresponding to the field, so it already knows which field is being checked.

changesFrom() and changesTo() however, both take one argument - a value to compare the old or new value of the field to, respectively.

All three methods return a boolean true/false indicating whether the expression is accurate, as you can see in the following example usage.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.214.230