Firstly we need to find out the ID of the Dialog. This could be attained in 2 ways.
1. Search with Dialog name in Customizations.xml
For eg: If you search with your dialog name, you could find something similar to this.
2. Open the Dialog and press F11 to get the URL. In the URL we could find out the ID of the Dialog.
Javascript Code snippet:
var dialogId = "a13ad982-d812-40a0-ab67-f314cdabbd2b"; // This must be your Dialog ID//Optional:To save and close entity form as soon as the dialog is closed.
Sample Scenario :
To open a Dialog when the user clicks on Ribbon button of the entity form.
Thank you very much for sharing this information it was really helpful for me.
ReplyDeleteAs Microsoft have recently changed CRM Online to be linked in with Office 365 I had to make a very minor change to the call of the showModalDialog method to get it working.
var dialogId = "69095BF7-C20A-48BD-BCB5-989D5742D480";
var returnValue = showModalDialog("/cs/dialog/rundialog.aspx?DialogId=%7b" + dialogId + "%7d&EntityName=new_request&ObjectId=" + Xrm.Page.data.entity.getId());
Thanks
ReplyDeleteEgyptianProgrammer@hotmail.com