locked
Activexobject - refreshing the calling entity screen RRS feed

  • Question

  • I am calling a windows app from a button in Dynamics CRM on a specific entity

        var oShell = new ActiveXObject("WScript.Shell");
        var varMyQuoteValue = Xrm.Page.getAttribute("name").getValue();
        var varMyRevValue = Xrm.Page.getAttribute("revisionnumber").getValue();
        var prog = "R:\\ASoftLocation\\CRM\\CRMSoftwareToRun.exe";
    
        oShell.Run('"'+prog+'"' +' "' + varMyQuoteValue + '" ' + '"' + varMyRevValue + '"',1);

    I need to know when this has finished running and then refresh the entity to update it's values, is it possible to do this, if so how?

    Matt

    Wednesday, January 25, 2017 3:14 PM

All replies

  • I've created a fudge / semi fix to this but it is not ideal and that is to open a message box (alert) prior to the activex program opening, the message box is hidden behind the open activex program.  Finally closing the activex program the user sees the message box clicks ok and the main entity screen is refreshed.

    This is far from ideal, but works at the moment.

    regards,

    Matt

    Friday, January 27, 2017 3:54 PM