Introduction
Microsoft Dynamics CRM is an enterprise Customer Management Solution assisting businesses with customer insights and offering an unmatched experience to customers right from day one, which includes creating a lead for customers managing an unmatched post-sales experiences.
Dynamics CRM comes with all the industry-specific features which assist implementation partners to meet the expectations of a business, but at times there are requirements that need custom developments.

Scenario
Business users want to see all the associated contacts to an account, on the loading of the account record in Dynamics CRM, and it should be visible to users on a MODAL through which they will be undertaking required action over the associated contacts
Implementation
- To fulfill this requirement we will be using HTML along with Javascript
- The Javascript will be triggered on Load of the account form, which will be calling.
- This function will be opening an HTML Web resource through which we will be making a Web API request to Dynamics CRM application, pulling in data and presenting the same in table format
- HTML Web Resouce along with Bootstrap will be used
Explanation of the Javascript Code
Function
Xrm.Navigation.navigateTo utilizes the following set of parameters
- PageType: We are passing it as a WebResouce as over here we want to load an HTML Web resource
- Name of web resource: We need to pass the name of HTML web resource which needs to be loaded on a load of the account record
- Data: It's optional, let's say here for our requirement we are passing the GUID of the account record
Explanation to the HTML Code.
This code gets triggered the moment the HTML Page gets loaded which in turn calls the load records function
The loadRecords function makes a Web API request to Dynamics CRM Application which pulls in a required set of information and we store it an Array which is later on coupled/loaded to bootstrap table.
And moving ahead this table is loaded in DIV block to present and show the data to users for undertaking the required action
HTML code for modal in dynamics CRM