addOnSave (Client API reference)

Adds a function to be called when the OnSave event is triggered. The event occurs before the save occurs, giving the handler an option to cancel the save operation.



Unsure about entity vs. table? See Developers: Understand terminology in Microsoft Dataverse.


Name Type Required Description
myFunction function reference Yes The function to be executed when the record is saved. The function will be added to the bottom of the event handler pipeline. The execution context is automatically passed as the first parameter to the function. See Execution context for more information.


Form OnSave event


Can you tell us about your documentation language preferences? Take a short survey.

The survey will take about seven minutes. No personal data is collected (privacy statement).