Enterprise Requirement: Consumer needed to disable auto save on sure Gross sales entities similar to Leads and Alternatives in order that it’s certain that person has accomplished all the data. On all different entities, consumer requirement was to maintain auto save.
Answer: We’ve to write down a small client-side script and register it on save occasion of Lead and Alternative document to realize this requirement.
Right here is the script:
perform preventAutoSaveOperation(executionContext)
{
var eventArguments = executionContext.getEventArgs();
if (eventArguments.getSaveMode() == 70 || eventArguments.getSaveMode() == 2) {
eventArguments.preventDefault();
}
}
In case you might be in search of differing kinds that getSaveMode returns right here is the entire record:
Worth | Save mode | Desk |
1 | Save | All |
2 | Save and Shut | All |
5 | Deactivate | All |
6 | Reactivate | All |
7 | Ship | E mail |
15 | Disqualify | Lead |
16 | Qualify | Lead |
47 | Assign | Consumer or Group owned tables |
58 | Save as Accomplished | Actions |
59 | Save and New | All |
70 | Auto Save | All |
Hope it helps and Energy 365ing as standard!
Different methods to study with me:
Any downside in Energy Platform or Dynamics 365 – finish person, Microsoft companion or a person?
Drawback Space – Technical, Purposeful, Coaching, Growth or consulting?
I’m right here to assist, get in contact right here: Click here