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

Defines the function that is executed after a record is submitted.

The afterSubmit operation is useful for performing any actions that need to occur following a write operation on a record. Examples of these actions include email notification, browser redirect, creation of dependent records, and synchronization with an external system.

Notes:

  • The approve, cancel, and reject argument types are only available for record types such as sales orders, expense reports, timebills, purchase orders, and return authorizations.
  • Attaching a child custom record to its parent or detaching a child custom record from its parent triggers an edit event.
  • Asynchronous afterSubmit user events are only supported during webstore checkout.

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

  1. create
  2. edit
  3. xedit (inline editing; only returns the fields edited and not the full record)
  4. delete
  5. approve (only available for certain record types)
  6. cancel (only available for certain record types)
  7. reject (only available for certain record types)
  8. pack (only available for certain record types, for example Item Fulfillment records)
  9. ship (only available for certain record types, for example Item Fulfillment records)
  10. dropship (for purchase orders with items specified as “drop ship”)
  11. specialorder (for purchase orders with items specified as “special order”)
  12. orderitems (for purchase orders with items specified as “order item”)
  13. paybills (use this type to trigger afterSubmit user events for Vendor Payments from the Pay Bill page. Note that no sublist line item information will be available. Users must do a lookup/search to access line item values.)

Returns: void

Since: Version 2015 Release 2

Leave a comment

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