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

  • MarcDynamics Profile Picture
    MarcDynamics 30 on at
    RE: 'Microsoft' is undefined error in HTML web resource

    Thanks, your solution helped me.

  • Verified answer
    Anh Luu Profile Picture
    Anh Luu 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
    Anh Luu 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
    Andreas Cieslik 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
    Anh Luu 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
    sandeepstw 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
    Anh Luu 215 on at
    RE: 'Microsoft' is undefined error in HTML web resource

    Any ideas?

  • Anh Luu Profile Picture
    Anh Luu 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

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,575 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,493 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans