Recalculate button code RRS feed

  • Question

  • Hi,I want to add my custom code on  the Recalculate button click event on Invoice entity. So can anyone tell me where should I will find the Recalculate click event in CRM4.0?


    Also I want to know the present (Defauld) functionality  of "Recalculate" button on opportunity.


    Thanks in advance

    Friday, April 29, 2011 6:45 AM

All replies

  • Use following code in OnLoad() method:



    var btnCalc = document.getElementById("_MBcrmFormSubmitCrmForm1truetruefalse");
    if (btnCalc != null)
     btnCalc.action = "somemethod();" + btnCalc.action;
     // alert(btnCalc.action);
    somemethod = 
     alert('this is test method');



    You can extract the object using its ID. I used IE8.0 developer toolbar which is _MBcrmFormSubmitCrmForm1truetruefalse in this case.

    Then if the object is extracted successfully change it's action property to consume your custom JavaScript code.


    Paradise lies at the feet of thy mother. - Prophet Mohammed (PBUH)

    • Edited by Khadim Ali Monday, May 2, 2011 7:49 AM description correction
    • Proposed as answer by Khadim Ali Wednesday, May 11, 2011 9:14 AM
    Friday, April 29, 2011 8:06 AM