Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

How to get GetGlobalContext()

Posted on by 3,610

I've added following script in HTML webresource of CRM online trial to get global context but it is not working and throws exception. Failed to load resource: the server responded with a status of 404 () . 

Any idea to get this done?

<script type="text/javascript" src="ClientGlobalContext.js.aspx"></script>
<script type="text/javascript">
function getLoggedInUserRoles() {
	try {
		debugger;
			var parameters = GetGlobalContext().getQueryStringParameters();
		} catch (e) {
			alert("Error: "+e.Message);
		}
	}
</script>


*This post is locked for comments

  • Suggested answer
    Arun Vinoth Profile Picture
    Arun Vinoth 11,613 on at
    RE: How to get GetGlobalContext()

    Probably you have folder structure introduced for web resources. Try adding forward slashes to map the right path.

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

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