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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Global JavaScript web resource

(0) ShareShare
ReportReport
Posted on by

I have a javascript web resource which I would like to use through out the whole crm  and in different solutions within the same organisation and for other javascript web resources to access it methods.

How do i make a javascript web resoource global for use even by custom ribbon buttons or how can i reference a javascript web resoource from another javascript web resource in a different crm solution.

Am using crm online

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Royal King Profile Picture
    27,686 on at

    Keep your global javascript in top of the file order , to refer this script in your other script files. As long as you have script file added in the form you can refer functions of the global script in other javascript file function.

  • johny_crm Profile Picture
    735 on at

    The main problems is that the script needs to be referenced by the ribbon custom buttons not necessarily on a form.

  • Royal King Profile Picture
    27,686 on at

    As long as script is part of your entity form, you can refer functions from this script in ribbon custom button as well you ca refer these file functions in another script file that you referenced in the custom ribbon button action.

  • Verified answer
    Aileen Gusni Profile Picture
    44,524 on at

    Hi,

    You need to add multiple reference of the web resources you are using, but you just need to add function from the independent web resource javascript you use. The common or global, you don't need to define the function.

    I think this link can help you..

    rajeevpentyala.wordpress.com/.../loading-dependent-jscript-libraries-in-ribbon-buttons-execution-crm-2011

    Hope this helps!

    THanks.

  • Suggested answer
    ScottDurow Profile Picture
    21 on at

    There really isn't a supported way of loading a script globally - you have to reference it separately where ever you use it. CRM will only load it once where it is referenced in multiple places. See my blog on script loading -develop1.net/.../CRM-2013-Script-Loading-Deep-Dive.aspx

  • Pavan Deepala Profile Picture
    90 on at

    Thank you so much Scott for the Analysis you have done and sharing the information. This really helped me a lot !!

  • Muhammad Ali Sakhi Profile Picture
    15 on at

    How is this implemented. www.youtube.com/watch

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans