I'd be intrigued to know whether anyone else has also been restricted by the lack of a complementary trigger to OnRecordLoad?
A typical situation is that we want to allow a user time to carry out editing a new record but once they leave the record we perform a script (say for setting some tasks in a portal). Our options include:
OnRecordCommit - this does not run if the record is already committed when the user leaves the record and we would want to allow the user to commit during their editing without firing the script
We can trap for:
Finding another record - OnModeExit
Leaving the layout - OnLayoutExit
Navigating to another record via the book icon in the task bar - Custom menus for Go to Next/Prevous records
However, this still leaves an exposure if the record slider is used, a number is entered directly in the record number or show omitted is used in the status toolbar.
We could create a global variable by hijacking the New Record command and refer to this using an OnRecordLoad trigger in the record subsequently navigated to, record this new record number, script a return to the original record, perform our scripted procedures and then return to the subequent record, but again this doesn't account for the use of show omitted records where the found set would be different. We could also use Open New Window, search for the old record, run the script and close window, but as most of our solutions run on Windows this can lead to screen refresh issues and there is always the small chance another user has taken ownership of the previous record and we get a record in use error.
It seems strange that we've mostly had triggers in pairs - OnLayoutEntry/Exit, OnModyEnter/Exit, but OnRecordLoad is on its own.
It is possible we may get new triggers in future versions and this one has been requested within the new features web page, but if anyone has found an elegant alternative to the above, we'd be interested to hear from them.