Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

Handle the order in which the web resources are loaded

Posted on by 25

Hi guys,

Maybe, someone could tell me if we currently have a mechanism to handle with the async loading of the web resources in the newer version of CRM v9 when the legacy rendering is disabled?

I have just read the article published by Microsoft about the web resources dependencies, and it seems that the "Web resource dependencies does not provide any control over the order in which the web resources are loaded. All the web resources are loaded asynchronously and in parallel. If you have a JavaScript web resource which depends on another JavaScript web resource to be loaded and initialized before it can be initialized, you will need to manage that dependency in another way."

Does it mean that we still need to handle with this in other way? Have you overcome this somehow?

Kind regards

  • sermoc Profile Picture
    sermoc 25 on at
    RE: Handle the order in which the web resources are loaded

    Hi Ankit,

    I was doing some testing and I could see that CRM seems to load the scripts asynchronously but it doesn't calls the OnLoad event until all has been loaded.

    We use the same organization with legacy and non legacy checkmark and when it was non legacy, we can see that the web resources are loaded in parallel but CRM wait for its downloading and evaluation, therefore the onload method is not used until all of them have been loaded.

    Does it make sense for you ?

  • Suggested answer
    RE: Handle the order in which the web resources are loaded

    Hello Partner,

    Hope this post finds you well. As per the article yes , all the web resources are  loaded asynchronously and we don't have the control. But if order is required, then we can refer the javascript in another web resource or we can load the javascript in the required javascript and perform our task. We can also come up with setting the timeout for certain period and can check if method is available or not.

    Unfortunately for now this needs to be taken care by the customization as Out of the box feature is not handling the order of loading till now.

    Hope this post helps.

    Best regards,

    Ankit

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans