Editar

Compartilhar via


Save event arguments (Client API reference)

When the form OnSave event occurs, you can use the getEventArgs method of the execution context object to retrieve an object that contains methods you can use to manage the save event.

Method Description
getSaveMode Returns a value indicating how the save event was initiated by the user.
isDefaultPrevented Returns a value indicating whether the save event has been canceled because the preventDefault method was used in this event handler or a previous event handler.
preventDefault Cancels the save operation, but all remaining handlers for the event will still be executed.
preventDefaultOnError Cancels the save operation if the event handler has a script error, returns a rejected promise for an async event handler or the operation times out.
disableAsyncTimeout Disables the timeout for the event handler. Instead the event waits until the event handler's promise is fulfilled. Learn more about Async OnSave timeouts

PostSave event arguments

When the form OnPostSave event occurs, you can use the getEventArgs method of the execution context object to retrieve an object that contains methods you can use to manage the postsave event.

Method Description
getEntityReference Use this method to know information about a table being saved. It returns the table logical name, record ID, and table name if save was successful.
getIsSaveSuccess Use this method to know whether the save operation was successful or failed.
getSaveErrorInfo Use this method to know the error details on why save failed.

Client API execution context
Execution context methods