locked
OK button on Opportunity Close dialog is not working ! RRS feed

  • Question

  • I am trying to open close opportunity dialog with javascript in Opportunity form.

    But when i click on OK button it does not close the opportunity record.

     var url = serverUrl + '/SFA/opps/dlg_closeopp.aspx?dType=1&pID=' + Id + '&pType=3&won=false';

    any parameter in url i am missing??

    Thanks

    Thursday, May 1, 2014 7:22 AM

All replies

  • HI

    you have set the GUID value properly. To set the values of Actual Revenue field you need to modify your Query String as given below.

    var url = serverUrl + '/SFA/opps/dlg_closeopp.aspx?pID=' + guid + '&estimatedVal=' + crmForm.all.estimatedvalue.DataValue

    It fills the value of Actual Revenue in the new window.

    I'm sure this is too late for you, but I found that I also needed to add a "pType" argument ('&pType=3') to get the estimatedVal to show up. Also, I had an issue still where the status of the opportunity would not actually close when the close dialog was brought up this way.  I ended up having to write a workflow that would trigger on the field that I have triggering this dialog to show, and then close the opportunity.


    Alessandro Graps

    Friday, May 2, 2014 8:43 AM