Custom JavaScript in InforCRM
When you need to include a custom JavaScript in the InforCRM web client, the quickest way is to simply add the <script> tag to the base.master file. However this complicates upgrades because the base.master file is often modified in Infor’s web updates, and it prevents you from making a clean bundle. So, I wanted to share another way which does not require modifying any of the InforCRM’s stock files. You can create a module, register it on the portal as a global module, and use code such as:

public void Load()
    Page page = HttpContext.Current.Handler as Page;
    if (page == null)
    ScriptManager.RegisterClientScriptInclude(page, page.GetType(), "XTIVIA_SharedScript", 
        HttpContext.Current.Request.ApplicationPath + "/XTIVIA/js/common.js");

Now this module can be added to the bundle and installed on the customer database without interfering with their existing customizations.

Share This