[CRM 2013] How to add callback JavaScript functions which are fired after closing an Opportunity record. RRS feed

  • Question

  • 'OnSave' events are not fired after closing a opportunity record somehow. 

    On the other hand, 'OnSave' events are fired after Reactivating a record.

    I think 'OnSave' events used to be fired in CRM 2011.


    • Edited by dora_san Monday, February 24, 2014 4:35 AM
    Monday, February 24, 2014 4:32 AM

All replies

  • It seems this is because of autosave Check if your autosave functionality is enabled. If everthing is saved already onsave won't fire because there is nothing to save. Try to disable auto save and check your logic.


    Our Website | Our Blog | Follow US | My Facebook Page | Microsoft Dynamics CRM 2011 Application Design
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

    Monday, February 24, 2014 6:23 AM
  • Thank you for your reply.

    I just made the autosave check disable but still OnSave events are not fired.

    By the way, I traced JavaScript events and found an event which is called after closing a Opportunity record.

    The code block below works fine, although it's not a supported way.

    var original = Mscrm.CommandBarActions.performActionAfterOpportunityClose;
    Mscrm.CommandBarActions.performActionAfterOpportunityClose = function(returnValue){
    	//write your custom code


    Monday, February 24, 2014 6:49 AM