Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Loading jQuery script onto CRM 365 form

Posted on by 160

I have created a web resource to contain my jQuery 3.3.1.min.js script.  I have loaded the script onto my form, but am not sure what to call in my OnLoad form event to reference jQuery on my form:

0218.jquery.png

I've seen a few posts, but it's still not clear to me.

Thanks!

*This post is locked for comments

  • Verified answer
    Z_Mike Profile Picture
    Z_Mike 160 on at
    RE: Loading jQuery script onto CRM 365 form

    Sorry for not responding sooner.  I have decided to not use jQuery directly on my form.

  • Z_Mike Profile Picture
    Z_Mike 160 on at
    RE: Loading jQuery script onto CRM 365 form

    Sorry that I didn't respond sooner.  Thanks for sending the article link.

  • Verified answer
    Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: Loading jQuery script onto CRM 365 form

    Hi,

    You should be able to use them just like other methods from your simple javascript, You can click on the Add button and call any jquery method from your jquery or you can call javascript and in javascript web resource you can refer jquery.

  • Verified answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Loading jQuery script onto CRM 365 form

    Hi Mike,

    I agree with Adrian, it is not recommend/supported to use jQuery in form however if you still wish to use it, you can simple add it to the form libraries (like you have already done it) and in your custom resource, simply use it. I don't think you need to add any reference. Are you facing any issues?

    Hope this helps.

  • Suggested answer
    Adrian Begovich Profile Picture
    Adrian Begovich 21,009 Super User 2024 Season 2 on at
    RE: Loading jQuery script onto CRM 365 form

    Hi Z_Mike,

    This is not supported.

  • Z_Mike Profile Picture
    Z_Mike 160 on at
    RE: Loading jQuery script onto CRM 365 form

    I have seen that article, but I would like to use jQuery ajax on the form instead of an embedded web page.

  • Suggested answer
    Adrian Begovich Profile Picture
    Adrian Begovich 21,009 Super User 2024 Season 2 on at
    RE: Loading jQuery script onto CRM 365 form

    Hi Z_Mike,

    Microsoft does not recommend using jQuery in form scripts and ribbon commands, but it is okay to use jQuery in HTML web resources. You can find information on some of the best practices for using JavaScript with Microsoft Dynamics 365 here.

    This article shows an example of jQuery used inside a HTML web resource.

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