Answered by:
CRM 2013 and Javascript Model Dialogue issue

Question
-
Hi All,
I was using Model dialogue in CRM 2013. it stopped working in chrome. any solution for this? I want to show lookup dialogue.
Thanks & regards
Samir
Wednesday, October 22, 2014 11:59 AM
Answers
-
Hi CRM_Dev1,
window.showModalDialog was deprecated and now Google Chrome v37 disabled the showModalDialog API.
You can use Xrm.Internal.openDialog that is internal method of CRM 2013 to open the model like CRM 2013.
var DialogOption = new Xrm.DialogOptions;
DialogOption.width = 500; DialogOption.height = 420;
Xrm.Internal.openDialog("URL TO open",
DialogOption,
null, null,
CallbackFunction);
function CallbackFunction(returnValue){ }
It is unsupported and it may be changed by MS in future. I am not sure how it will behave in mobile application.
Thanks!
Kalim Khan
If this post helps you, please click "Mark As Answer" on the post and "Vote as Helpful"
- Edited by Kalim Khan Wednesday, October 22, 2014 12:14 PM
- Proposed as answer by Kalim Khan Wednesday, October 22, 2014 12:35 PM
- Marked as answer by CRM_Dev1 Wednesday, October 22, 2014 12:49 PM
Wednesday, October 22, 2014 12:11 PM
All replies
-
Hi CRM_Dev1,
window.showModalDialog was deprecated and now Google Chrome v37 disabled the showModalDialog API.
You can use Xrm.Internal.openDialog that is internal method of CRM 2013 to open the model like CRM 2013.
var DialogOption = new Xrm.DialogOptions;
DialogOption.width = 500; DialogOption.height = 420;
Xrm.Internal.openDialog("URL TO open",
DialogOption,
null, null,
CallbackFunction);
function CallbackFunction(returnValue){ }
It is unsupported and it may be changed by MS in future. I am not sure how it will behave in mobile application.
Thanks!
Kalim Khan
If this post helps you, please click "Mark As Answer" on the post and "Vote as Helpful"
- Edited by Kalim Khan Wednesday, October 22, 2014 12:14 PM
- Proposed as answer by Kalim Khan Wednesday, October 22, 2014 12:35 PM
- Marked as answer by CRM_Dev1 Wednesday, October 22, 2014 12:49 PM
Wednesday, October 22, 2014 12:11 PM -
you can restore it using this registry fix:
http://www.crmanswers.net/2014/09/google-chrome-registry-fix-for-dynamics.html
if it doesn't work you can try the policy method:
http://xrmrocks.com/2014/09/08/chrome-37-breaks-crm-2011-functionality/
My blog: www.crmanswers.net - Rockstar 365 Profile
- Proposed as answer by Guido PreiteMVP Wednesday, October 22, 2014 12:16 PM
Wednesday, October 22, 2014 12:16 PM -
Thanks Kalim, It was helpful. I found blog based on your info to open the lookup using Xrm.Internal.openDialog to show model dialogue. It worked without any issue.
Guido, I didn't try your solution as it will require change on every users machine. thanks
Wednesday, October 22, 2014 12:49 PM