web
You’re offline. This is a read only version of the page.
close
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

I have the same question (0)
  • Suggested answer
    Shidin Haridas Profile Picture
    3,497 on at

    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!

  • Community Member Profile Picture
    on at

    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

  • Verified answer
    Community Member Profile Picture
    on at

    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

  • Community Member Profile Picture
    on at

    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

  • Community Member Profile Picture
    on at

    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. 

     

     

  • Community Member Profile Picture
    on at

    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

  • Community Member Profile Picture
    on at

    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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans