OnBeforeSave Event
Copy
The OnBeforeSave event is triggered before the actual save request is sent to the server. Within its event handler, you can implement code to validate changes and cancel the save operation by returning false if any issues are detected.
var isItemNew = appStudioWizard.isItemNew();var controlValue = appStudioWizard.getControlValue(‘controlName’);
// Before calling a server method to save data. Refer to ApplyMethod Examples on how to stop server method to save data.
if (isNew && !controlValue)true;elseappStudioWizard.showErrorMessage(“Failed to save the custom data.”);false