Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

'Microsoft' is undefined error in HTML web resource

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,265 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans