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)

'Microsoft' is undefined error in HTML web resource

(0) ShareShare
ReportReport
Posted on by 215

Hello everyone,

.

I have developed an HTML web resource which should be able to be browsed by a URL.

I mean that I don't put this HTML on form as iframe/webresource control.

The problem is that when I browse the web resource using the URL via Internet Explorer, the following error occurs:

"Microsoft is undefined"

42853.Untitled.png

Then I tried removing

<script src="ClientGlobalContext.js.aspx" type="text/javascript"></script>

then the error ran away, but the scripts on the HTML web resource didn't work correctly.

.

Has anyone got this error? And how to solve it?

I have Dynamics 365 (ver. 8.2.1.176) on-premise installed.

.

Thanks for your help,

Anh

*This post is locked for comments

I have the same question (0)
  • Anh Luu Profile Picture
    215 on at

    Any anwers?

  • Anh Luu Profile Picture
    215 on at

    Any ideas?

  • sandeepstw Profile Picture
    4,601 on at

    Hi,

    It will only work if you browse under Dynamcis crm domain url. I think, it's relative path issue. Can you please share browser url which you are using for browse js and dynamics crm.

    THanks,

    Sandeep

  • Anh Luu Profile Picture
    215 on at

    I use the same url in Internet Explorer, Firefox and Chrome.

    But only Internet Explorer does not work, others 2 browsers work fine.

  • Andreas Cieslik Profile Picture
    9,267 on at

    I recommend using the sample provided here:

    [View:https://msdn.microsoft.com/en-us/library/gg328541.aspx:750:50]

    to add the clientglobalcontext script. It is important to set the path to the script correctly

    <script src="../ClientGlobalContext.js.aspx" type="text/javascript" ></script>

  • Anh Luu Profile Picture
    215 on at

    Already tried, the same behavior as when I remove the reference.

    But as I said, the error only occurs when using Internet Explorer, other browsers work ok.

  • Verified answer
    Anh Luu Profile Picture
    215 on at

    I have just figured out today that the issue is caused by the default Document mode of Internet Explorer is 7, when I changed it to "11" or "Edge", it works fine :)

    So to fix this, I need to add the following code to the <head> tag of my HTML web resource

    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  • MarcDynamics Profile Picture
    30 on at

    Thanks, your solution helped me.

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