Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Microsft Dynamics 365 CRM Portals Global JavaScript

Posted on by Microsoft Employee

Hi,

We are working with Portals but I am not sure how to include a JS script that impacts every page, web form, entity form, etc.

I already tried to insert the script in a Footer Content Fragment but there are forms they haven't footer or header, I have also tried to insert the script on the "Main page" or "Custom Portal" site.

Any suggestions on where to include the script "globally"?

Thanks in advance.

*This post is locked for comments

  • Suggested answer
    Summer Garg Profile Picture
    Summer Garg 585 on at
    RE: Microsft Dynamics 365 CRM Portals Global JavaScript

    Hi Martin,

    Check below link for Portal tutorial list :

    crmhub.blogspot.com/.../d365-portal-adx-studio-portal.html

    For JS :

    crmhub.blogspot.in/.../how-to-use-java-script-in-adx-studio.html

  • Suggested answer
    Dmytro Rutkovskyi Profile Picture
    Dmytro Rutkovskyi 1,835 on at
    RE: Microsft Dynamics 365 CRM Portals Global JavaScript

    As you mentioned you can create page based on webpage template without header and footer. So basically you can create a completely empty page and output for example json on this with liquid.

    So answer is obviously  - there are no way to include javascript file globally to every page.

    If most of the pages derived from one-page template (web-template based )  - you can include this javascript to that page template.

    If most of the pages use header or footer - you can include there.

    web pages/ entity forms/ entity list  - all have separate section for javascript (which is just entity field). You can always write the plugin which makes sure it adds your custom javascript include to every web pages/entity forms/entity list modified or created.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Microsft Dynamics 365 CRM Portals Global JavaScript

    I know how to enable JavaScript as uploadable files. Also, this won't work for some entity forms, when those don't have header or footer. I need something more global than a header or footer. Thanks anyway.

  • Dmytro Rutkovskyi Profile Picture
    Dmytro Rutkovskyi 1,835 on at
    RE: Microsft Dynamics 365 CRM Portals Global JavaScript

    For example you can insert reference to your script into the Header or Footer web temaplte.

    But please read how to bypass some default file extension restrictions here: colinvermander.com/.../dynamics-365-portals-javascript-as-web-files

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans