User Event Script BeforeLoad-contexts (SuiteScript 2.x) || context.UserEventType

Defines the function that is executed before a record is loaded; that is, whenever a read operation occurs on a record, and prior to returning the record or page.

These operations include navigating to a record in the UI, reading a record in SOAP web services, and loading a record.

The beforeLoad event cannot be used to source standard records. Use the pageInit client script for this purpose.

Notes:

  • beforeLoad user events cannot be triggered when you load/access an online form.
  • Data cannot be manipulated for records that are loaded in beforeLoad scripts. If you attempt to update a record loaded in beforeLoad, the logic is ignored.
  • Data can be manipulated for records created in beforeLoad user events.
  • Attaching a child custom record to its parent or detaching a child custom record from its parent triggers an edit event.

This event can be used with the following context.UserEventType:

  • create
  • edit
  • view
  • copy
  • print
  • email
  • quick view

Returns: void

Since: Version 2015 Release 2

Leave a comment

Your email address will not be published. Required fields are marked *