Skip to main content

Notifications

Microsoft Dynamics CRM forum
Suggested answer

How to add external JS file in all pages of Partner Portal

editSubscribe (0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi guys!

I have added one external .js file in my parnter portal. I want to include it in all pages of partner portal by default. How can i achive this.

I have alread two custome .css file and its already working fine. but i am unable to find, how to its been added and how to add more?

Can you please help me on this. Thanks!!

crm_2D00_portal.JPG

Categories:
  • RE: How to add external JS file in all pages of Partner Portal

    Hi Ridvan,

    After adding your external js as web file in portal select Parent Page as "Home" for that web file record.

    It will be applicable to all pages in portal.

    Thanks & Regards,

    Prakash 

  • Suggested answer
    JasonMcneil Profile Picture
    JasonMcneil 215 on at
    RE: How to add external JS file in all pages of Partner Portal

    I've generally had luck including JavaScript at the very end of footer template, not in the <head> tag as you're asking for, but many consider including JavaScript at the very end of the page to be best practice stackoverflow.com/.../whats-pros-and-cons-putting-javascript-in-head-and-putting-just-before-the-bod

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to add external JS file in all pages of Partner Portal

    @Ravi Kashyap, I have verified this. I have allowed JS to upload and verified file. It's available in portal too. Question is, how to include it in <head><script src="/file.js"></script></head>

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to add external JS file in all pages of Partner Portal

    I have added js in Header (Web Templates) but it doesn't include in <head> tag of the page. Somehow i can make it work this way but i want this just code to be place in <head> only.

  • Suggested answer
    Sandeep Mishra Profile Picture
    Sandeep Mishra 4,601 on at
    RE: How to add external JS file in all pages of Partner Portal

    HI,

    Make a web template for all pages which you want to add external js and include there. By this way you can make unique designs.

  • RaviKashyap Profile Picture
    RaviKashyap 55,406 on at
    RE: How to add external JS file in all pages of Partner Portal

    Hi Ridan,

    Not sure if you are aware of this but worth checking if you are running into the same issue as mentioned in this blog. Basically CRM ignores the js file when you upload it as it is blocked.

    colinvermander.com/.../dynamics-365-portals-javascript-as-web-files

    Hope this helps.

  • Suggested answer
    Mahendar Pal Profile Picture
    Mahendar Pal 45,039 on at
    RE: How to add external JS file in all pages of Partner Portal

    Did you try to add your js in the header page, then it should be available to every page automatcially.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to add external JS file in all pages of Partner Portal

    I have added same way but its not reflecting in <head>. I am trying to add .js file. Earlier we added .css file and its included properly as well as working fine. Unable to identify issue for JS.

  • Mahendar Pal Profile Picture
    Mahendar Pal 45,039 on at
    RE: How to add external JS file in all pages of Partner Portal

    Hi,

    You can add this fine at a web files and later can refer it in portal. You can also follow steps here: www.cloudfronts.com/adding-custom-css-for-dynamics-crm-portal-ui

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to add external JS file in all pages of Partner Portal

    I forgot to mention that, I want to include this in <head> tag.

Helpful resources

Quick Links

Take the Community feedback survey!

Answer this brief 15-question survey about your Community experience…

Demystifying Copilot: Service Edition with Sundar Raghavan

Sundar answers more questions about Copilot for Service...

Dynamics 365 Business Central vs Finance and SCM

Take a look at the key differences between Business Central and…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,375 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 223,308 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,140

Featured topics

Product updates

Dynamics 365 release plans