Using JavaScript and where to write it in D365 CRM Portals

Posted On June 9, 2017 by Admin Posted in 

In this blog, we shall see how can a user can write a JavaScript Code and where exactly should the user place the code in order to customize the D365 CRM Portal for version 8.0+.

Pre-Requisites:

  1. D365 CRM Portals
  2. D365 CRM Environment

Scenario:

The user is often confused as to where exactly should he write the Java Script Code to make the following customizations to the CRM Portals Web Page. We will write a simple JavaScript function to disable the fields in this case the user will disable the email and phone number input fields on the on the Contact Us Web Page of D365 CRM Portals as shown below.

Fig 1: Image showing disabled email and phone number fields using custom JavaScript

Process:

Step 1: The user will have to go the CRM Main Menu to Portals> Web Pages and select the respective web page to which the user wants to implement the required changes as shown below.

Fig2: Selecting the Web Page

Step 2: On opening the Web Page the user will get a section called the Localized content. The user should select the option as shown below.

Fig 3: Select the Localized Content

Step 3: On selecting the option in the localized Content as shown in the previous step, the user will have to scroll down and expand the Advance tab where the user get two input sections which are ‘Custom JavaScript’ and ‘Custom CSS’ as shown below. The user has to put the custom JavaScript into the ‘Custom JavaScript’ input section.

Fig 4: Writing the JavaScript into the ‘Custom JavaScript’ input section of the localized content

Step 4: The user can also add the custom JavaScript Code to the front side editor of the Portal using the administrative tool as shown below.

Fig 5: Writing the JavaScript Code on the Front End using administrative tool.

Conclusion:

Thus in this way we can implement a simple custom JavaScript Code to customize the D365 CRM Portal.


Share Story :

Secured By miniOrange