Before Load event is triggered by any read operation on a record. Any time a user, a script, a CSV import, or a web service request attempts to read a record from the database, the
Before Load event gets fired.
Record actions that trigger a
Code written in User Events will not trigger any User Events on other records. For example, loading the associated Customer record from the
beforeLoad of a Sales Order record will not trigger the Customer record's
beforeLoad. Even if you are loading another Transaction record, its User Events will not be fired.
NetSuite does this to avoid User Events triggering each other in an infinite loop. If you do need User Events to fire in a chained sequence, other script types (e.g. RESTlets, Suitelets, Scheduled Scripts) will need to be injected in between the events.
The return type of the
beforeLoad event handler is
void. Any data returned from our event handler has no effect on the system. We do not need to return anything from our handler function as we cannot actually do anything with its returned value.