When user saves the form we can check which save event was executed and regarding to that event make some actions. Two most popular save events are Save and SaveAndClose.
Javascript functions to call from your script:
crmForm.Save();
crmForm.SaveAndClose();
To check which event was executed we use "event.Mode"
Output for Save event = 1;
Output for SaveAndClose event = 2;
example:
if (event.Mode == 1) {
alert("You click Save button");
} else if (event.Mode == 2) {
alert("You click SaveAndClose button");
}
No comments:
Post a Comment