Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

Distinguish between opportunity save and opportunity close in JavaScript

$
0
0

Hi,

I have written some JavaScript that triggers on an opportunity's OnSave event, in a nutshell it checks for open activities on the opportunity and cancels the save if there are none.

It's working great except for the fact that closing an opportunity as won or lost also triggers the OnSave event. Using GetSaveMode returns a value of 1, which is exactly the same as if a user had clicked the save button.

How can I determine that it was the opportunity close button that was clicked and not the save button?

Thanks,

Robin


Viewing all articles
Browse latest Browse all 46379

Trending Articles