cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

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.

1 REPLY 1
Microsoft
Microsoft

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

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (11,453)