Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Dynamics 365 Portal - Best Practice for JavaScript

Hi All,

Thanks for reading my post.

We're doing configuration of 'Dynamics 365 Portal' for a client and we're bit confused where to maintain all of our JavaScript as per Best Practice?


At the moment, we have 3 viable options:-

  1. Option # 1: Only one 'Custom.js' web file, which has all the JavaScript of the entire portal. 
  2. Option # 2: Couple of '*.js' web files which are based on following principle:
    1. Core file - Contains functions that are used almost everywhere and other useful page things.
    2. Module files - Contains code that is used in several places, but not everywhere. 
  3. Option # 3: Write down the JavaScript in the 'Custom JavaScript' field of the Entity form / Web form.

Which approach are you guys inclined to? Or what is the Best Practice for a JavaScript based on performance & maintainability? 


Thanks for your time.

Community Support
Community Support

It is challenging point to design.  It regards to many matters.

- How amount of logics will be shared by pages/portals.

- How many portals or pages share the common script (all pages will load same script file, it means all pages will have same overhead to load or initial process).

- Change cycle of the common script file and pages/portals.


In my few experience, I have never seen a common big script file.  Because custom script is not big and depends on each page.

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (3,205)