While using "Custom Javascript" area in Web pages, Web Form Steps etc. I found it a little bit uncomfortable in use. The max length of 10 000 characters not always enough and if I add a compiled content then debugging is blocked. I ended up creating dynamic script loader. It picks up a url (like "~/Areas/FolderName/scriptName.min.js") from “Custom Javascript" area. Then script checks if such a namespace exists and object is loaded. If necessary, it loads the script. The idea is very simple. Have an object loaded with master page to load JavaScript and CSS files: if (typeof (gHelper) == "undefined") { gHelper = { __namespace: true }; } gHelper.data = { addedFiles: "", } gHelper.fn = (function (window, document) { function loadfile(filepath, filetype) { var fileref; // JavaScript file from solution ...
This blog is dedicated to Dynamics 365 Crm and Portals 365 (ex. Adxstudio portals). It shares some development/customization tricks and can be useful for professionals.