web
You’re offline. This is a read only version of the page.
close
Skip to main content
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)
  • MarcDynamics Profile Picture
    30 on at
    RE: 'Microsoft' is undefined error in HTML web resource

    Thanks, your solution helped me.

  • Verified answer
    Anh Luu Profile Picture
    215 on at
    RE: 'Microsoft' is undefined error in HTML web resource

    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" />
  • Anh Luu Profile Picture
    215 on at
    RE: 'Microsoft' is undefined error in HTML web resource

    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.

  • Andreas Cieslik Profile Picture
    9,267 on at
    RE: 'Microsoft' is undefined error in HTML web resource

    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
    RE: 'Microsoft' is undefined error in HTML web resource

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

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

  • sandeepstw Profile Picture
    4,601 on at
    RE: 'Microsoft' is undefined error in HTML web resource

    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
    RE: 'Microsoft' is undefined error in HTML web resource

    Any ideas?

  • Anh Luu Profile Picture
    215 on at
    RE: 'Microsoft' is undefined error in HTML web resource

    Any anwers?

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#2
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans