Reference > Script triggers reference > OnRecordRevert
 
OnRecordRevert
Performs a script before a set of records is reverted by the Records menu > Revert Record command or by the Revert Record/Request script step.
When the script runs
Before the event has been processed.
Modes in which the trigger can be used
Browse and Find modes.
Result
You can use the Exit Script script step within the triggered script to return True or False.
True: The event that triggered the script proceeds.
False: The event that triggered the script is canceled.
Compatibility 
 
Where the script trigger is activated 
Supported 
FileMaker Pro 
Yes 
FileMaker Server 
Yes 
FileMaker Go 
Yes 
Custom Web Publishing 
Yes 
FileMaker WebDirect 
Yes 
Runtime solution 
Yes 
Originated in 
FileMaker Pro 10.0
Notes
This trigger activates only when there are uncommitted record changes.
This script trigger activates if Save record changes automatically in the Layout Setup dialog box is not selected when a user reverts a record.
Clicking Revert Field in a field validation error dialog box does not activate this script trigger.
See Actions that don’t activate script triggers for a list of other actions that do not activate this script trigger.
Related topics 
Setting up script triggers
Setting script triggers for layouts
Setting script triggers for objects