web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Dynamics 365 Portal - ...
Power Apps
Unanswered

Dynamics 365 Portal - Best Practice for JavaScript

(0) ShareShare
ReportReport
Posted on by

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.

Categories:
I have the same question (0)
  • kojisaiki Profile Picture
    on at

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard