Hi Expert,
I have a requirement to show a modal Dialog on the click of ribbon button on an entity, onclick it should show a dialog where user will select some input from the dropdown and returning selected value and saving with the entity form. earlier it was implemented using window.ShowModalDialog function where I was passing URL of html webresource and showing it on the CRM Form, but its not supported in Chrome. I am looking for the alternate way to achieve this.
Thanks
*This post is locked for comments
Actually I am not allowed to go with window.parent.Xrm.Internal approach but Alert.js I can use. Again facing issue to implement this.
I am using Alert.showWebResource( ) function, Actual functionality is On the click of Task's ribbon button "Mark Complete" dialog should appear and when user select the appropriate value in the modal dialog it should return it back to the function and that result can we use in further code flow, but here as soon as I click mark complete, Form and this alert popup both are getting close.
Please suggest.
Hi,
How you are returning the value for ,
window.parent.Xrm.Internal.openDialog return the value in an JS object and then in the callback get the object.
Mscrm.Utilities.setReturnValue(ValueToPass);
See below reference -
butenko.pro/.../dynamics-crm-2013-step-by-step-creating-dialog-windows
Note :Xrm.Internal is deprecated and not documented. So it is your risk to use this function.
Hi ,
If you use older version 2.1 it's free -
github.com/.../license-v2.1.md
But new version need license -
Thanks Aric,
Tried Xrm.Internal.openDialog, facing some issues like form is also getting close as soon I click any button on Dialog, value is not returning properly. Trying to fix these issue and One Question is Alert.js is free to use or required licence ?
use this:
var DialogOption = new Xrm.DialogOptions; DialogOption.width = 500; DialogOption.height = 620; window.parent.Xrm.Internal.openDialog("/WebResources/your_web_ressource", DialogOption, null, null, callbackfunction);
it worked for me
Take a look at the following answers:
community.dynamics.com/.../255599
This gives you three different approaches:
Using Xrm.Internal.openDialog (not supported, so it might stop working in the future, but I know that a lot of people use this)
Using alert.js
Using openWebResource
Hope this helps.
Mohamed Amine Mahmoudi
83
Super User 2025 Season 1
Community Member
54
Victor Onyebuchi
6