Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is exact use of clientglobalcontext.js.aspx in Dynamics CRM?

In sample example in SDK and at different places on internet Clientglobalcontext.js.aspx file is mentioned, if I do not include it in my html web resource, it throws exception, but if I include file like,

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

Then only rest endpoint API is working. Now, I am not able to locate this file anywhere. What is exact use of this file? How to locate it?

like image 340
Pranit Kothari Avatar asked Jan 20 '26 11:01

Pranit Kothari


1 Answers

The purpose of the ClientGlobalContext.js.aspx is to provide the GetGlobalContext function.

It's all explained inside MSDN:

GetGlobalContext function and ClientGlobalContext.js.aspx (client-side reference)

The GetGlobalContext function returns the same context object found in the Xrm.Page.context.

The file is generated server-side, practically the ClientGlobalContext.js.aspx push a JavaScript file to the client when it is included with the <script> tag syntax.

like image 89
Guido Preite Avatar answered Jan 21 '26 23:01

Guido Preite



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!