10 Days Challenge–Tip #6

Have you worked with ClientGlobalContext yet?

Often times while writing your JS you need to reference the environment. Here’s where ClientGlobalContext.js.aspx comes into play. Reference it from your script using:

<script src="../ClientGlobalContext.js.aspx"></script>

assuming you are using folders to differentiate your resources.

This gives you access to several functions and global variables. The most notable are:

Functions: getOrgUniqueName, getQueryStringParameters, getUserId and getUserRoles


There’s a few others, but I find that these are the ones I use the most.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: