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

CRM 2015 - read result of Opportunity Close dialog in JavaScript

$
0
0

Can anyone recommend anything for CRM 2015 that would get the result of the dlg_closeopp.aspx dialog?

Details of my problem:

In CRM 2011, using code in the formSave event handler, I could grab the results of the  /SFA/opps/dlg_closeopp.aspx dialog and read the data from it, like this (All per this blog):

if(context.getEventArgs().getSaveMode() == 5 /*Close*/) {

var closeResult = crmFormSubmit.crNewState.Value;

}

But in CRM 2015, this isn't working for me.  In CRM 2015 the "Close as Won" button saves the form if it's dirty (with a saveMode = 1, but that doesn't matter too much) and then opens dlg_closeopp.aspx.  And in the onClose function for that dialog window, Microsoft's code calls some other internal code before finally calling Xrm.Page.Data.refresh().

Because Microsoft's code is its own "closed loop" (from opening the dialog to closing it and immediately refreshing the page), I cannot find a way to get that crmFormSubmit.crNewState.Value.

 


Viewing all articles
Browse latest Browse all 55831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>