ProApp Designer - Release 14.10 (Package 27)

OnBeforeSave Event

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;
else
appStudioWizard.showErrorMessage(“Failed to save the custom data.”);
false