Development, Howto

Dynamics CRM 2013: Step-by-step creating dialog windows

In my previous post, I shared with you how to use Microsoft CRM’s internal function to show a dialog window in Dynamics CRM 2013 inline style. In this post, I will provide a step-by-step guide on how to build your own dialogs in CRM 2013 style.

Let’s assume that we’ve built an html webresource and want to call it. The following code will help you to do that:

Take this sample code and adapt it to your needs and use. The following part is related to building the dialog.

If you used parameters while calling the dialog, you can use the following helper method to get the values of the parameters:

To get parameters, you can use following code:

Here is the code of the whole dialog page:

Here are several tips:

1. Remember regarding location of ClientGlobalContext.js.aspx relatively to your webresource.

2. If you want to return something to a callback function you’ve declared during the call of dialog, use this snippet from the btnOK button:

3. If you want to close dialog from your dialog controls, use the closeWindow method.

All this information I got while building a simple dialog shown in the following picture (function – possibility to merge Sales Orders that is not available out-of-box):

All provided scripts and approaches are not recommended because internal CRM methods are used and your code could be broken if any of the used methods are changed during the installation of updates.

One Commnet on “Dynamics CRM 2013: Step-by-step creating dialog windows

  1. Pingback: My Homepage

Leave a Reply

Your email address will not be published. Required fields are marked *