Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

V9-Dynamics 365 App for Outlook doesn't load form scripts

(1) ShareShare
ReportReport
Posted on by

Hi,

I have been getting script errors when I use the Dynamics 365 App for outlook, on my Outlook desktop Application after the upgrade to Version 9. The errors are due to the fact that the scripts aren't being rendered/not loading up in the Outlook desktop App.

The same script works fine on the Outlook Web Application & the Web Application of CRM without any issues. 

Could someone please suggest what I can do to get the scripts to load?

Here are the details of the script error:- 

ReferenceError: Web resource method does not exist: OpportunityForm.onLoad

Thanks,

Sravya Patti

*This post is locked for comments

  • RE: V9-Dynamics 365 App for Outlook doesn't load form scripts

    Hi Poojan,

    I haven't used Xrmtoolkit anywhere in my code so I did not run into this issue. I have used the XMLHTTPRequest Calls to retrieve data the same way as shown in MS documentation and it works fine for me.

    Thanks,

    Sravya

  • RE: V9-Dynamics 365 App for Outlook doesn't load form scripts

    Hi Sravya,

    Thanks for sharing demo statements but I'd already checked script for errors, it was well written and worked well on Web form as well as on UUI form but not working on Outlook App.

    I'm hereby presenting the error statement.

    var response = XrmServiceToolkit.Soap.Retrieve("systemuser", userid, ["fullname", "businessunitid"]);

    Error: "401 - Unauthorized Access"

    So, you'd faced this retrieve situation earlier in your code within Outlook App ?

    Thanks & Regards,

    Poojan Bhayani

  • RE: V9-Dynamics 365 App for Outlook doesn't load form scripts

    Here are few examples of the changes in my code:-

       Example1 - leadQualifiedSalesStageArray.forEach(element => { });    TO  leadQualifiedSalesStageArray.forEach(function(element) { });

     

        Example 2 - var percentageTotal = technicalTeams.reduce((accumulator, projectRole) => accumulator + projectRole.neu_percentage, 0);

                        TO

         var totalVal = technicalTeams.reduce(function(accumulator, projectRole) { accumulator + projectRole.neu_percentage}, 0);

     

    Missing semicolons, Order of function definitions in case you are following a namespace approach for the script definitions were few other things I changed.

     

    Additionally, you might also want to validate your scripts using any online javascript validator, to look for any possible errors. 

     

     

  • RE: V9-Dynamics 365 App for Outlook doesn't load form scripts

    Hi Sravya,

    Thanks for the communication.

    Yes I'm already ain align with MS and waiting for their suggestions but don't know how much time they'll take. So, due to our business priority projects needs to solve it ASAP.

    So, can you please share some of your ECMA 5 workarounds ? So, that I can aware and try to change my existing scripts to ECMA 5 standards ?

    Thanks & Regards,

    Poojan Bhayani

  • Verified answer
    RE: V9-Dynamics 365 App for Outlook doesn't load form scripts

    Hello Poojan,

    The issue seems to be due to the incompatibility of IE 11 with ECMA 6 Scripting standards. I switched the code to ECMA 5 standards and the script worked fine. However, if there are a lot of scripts which are impacted, you might want to wait for a response from MS about your ticket. It is an issue with IE and Outlook app for Version 9 of CRM.

    Thanks,

    Sravya

  • RE: V9-Dynamics 365 App for Outlook doesn't load form scripts

    Hi Sravya,

    I'm experiencing the same unexpected behavior when I'm going to open quick create forms for Account, Contact, Lead and Opportunity forms within Outlook client with Dynamics 365 App for Outlook because we have our own custom scripts on each of them. Hence, got "401 - Unauthorized Access" every time and it seems like Microsoft issue for D365 Outlook App.

    Already tried solution given by Shidin but no joy with that. So, I already escalated to MS and raised a premium support case with them.

    So, let me know your problem solved or you got any further workaround for the same issue that you experienced.

    Regards,

    Poojan Bhayani

  • Suggested answer
    Shidin Haridas Profile Picture
    Shidin Haridas 3,497 on at
    RE: V9-Dynamics 365 App for Outlook doesn't load form scripts

    Is there any documentation which says that the scripts will form for Outlook Desktop?

    Secondly, can you try the following?

    Navigate to IE -> Internet Options -> Security -> 'Enable Protected Mode'

    And, clear your cache and try again?

    It makes sense now to allow script files to load within the Outlook Desktop, maybe as a security measure.

    But I am yet to find any documentation which suggests that form scripts do render.

    Cheers!

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans