This project has moved and is read-only. For the latest updates, please go here.

Dialog Does Not Open in Chrome when Fired from Views

Dec 9, 2016 at 3:46 PM
I have followed the instructions to attach the alert.js to the view command action and it works fine in IE but I cannot get it to do anything in Chrome. Any ideas?
Dec 9, 2016 at 8:52 PM
Hi, what version of Chrome are you using? Also what version of CRM? And can you show me an example of the code you're using?

I just ran a quick test and it seems to be working fine for me in Chrome v54 from views.

Regards
Paul
Jan 12 at 1:30 PM
Paul, sorry for the delay in getting back to you but having tested again today it is triggering the dialog now. Having said that I now get another issue. When I select Cancel or complete the dialog I get the following message when running via the list view (in both IE and Chrome).

"Cannot read property 'refresh' of null".

This is my JavaScript:

var CCRS = CCRS || {};

// -------------------------------------------------------------
// Name: Open Dialog
// ------------------------------------------------------------

CCRS.openDialog = function(dialogId,entityName,recordId)
{
try
{
    Alert.showDialogProcess(dialogId, entityName, recordId, CCRS.callBack, 615, 600)
}
catch(e)
{
    alert("Error - " + e.message);
}   
};


// -------------------------------------------------------------
// Name: Refresh the Page
// ------------------------------------------------------------

CCRS.callBack = function ()
{
try
{
    Xrm.Page.data.refresh(); 
}
catch(e)
{
    alert("Error - " + e.message);
}   
};
Jan 24 at 1:29 AM
Hi, Xrm.Page.data.refresh(); is a form function, which is why it doesn't work from the view. There are unsupported ways to refresh the view grid if that's what you're trying to do.
Marked as answer by Liger on 2/6/2017 at 6:43 PM