flukey

OnRecordLoad fires on empty found set

Discussion created by flukey on Dec 1, 2018
Latest reply on Dec 2, 2018 by philmodjunk

When you perform a find in a script and no records are found, if you have an OnRecordLoad script trigger set for that layout then it will fire, even though there are no records to load.  This one has caught me a number of times and I just thought I would ask if people thought that this is the correct way that it should work or if this is an issue.

 

A side effect of this, and the one that caught me again today, is that when the script trigger runs, immediately after the perform find, the Get(LastError) value is set to whatever the last script step in the trigger generated, not the error from the find.  Therefore checking for a 401 error will not work, you need to check for get(FoundCount).

Outcomes