web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :

JavaScript – getSaveMode

Neil Parkhurst Profile Picture Neil Parkhurst 10,727 User Group Leader

Quick post, hopefully useful reference material ….

getSaveMode(), returns a value indicating how the save event was initiated.

execObj.getEventArgs().getSaveMode()

Note: Don’t forget that you will need to tick the option to return the context as the first parameter on your on-save event.

Entity Event Mode Value
All Save 1
All Save and Close 2
All Save and New 59
All AutoSave 70
Activities Save as Completed 58
All Deactivate 5
All Reactivate 6
User or Team owned entities Assign 47
Email (E-mail) Send 7
Lead Qualify 16
Lead Disqualify 15

The following code could be used to prevent save from auto save events!

function preventAutoSave(econtext) {
    var eventArgs = econtext.getEventArgs();
    if (eventArgs.getSaveMode() == 70) {
        eventArgs.preventDefault();
    }
}

Comments

*This post is locked for comments