element. The name of each collection follows the naming convention of [Entity Schema Name]+ Set. This name is used in the URL to access a collection of entity records
If you want to do operation such as retrieve , delete, insert and update on the account entity then you use the name AccountSet and same for the other entities as well. After setting the serverURL in the next statement I have created XMLHttpRequest object with the name getSystemUser and then set the properties of the getSystemUser object.
In the open function of the getSystemUser object I have passed the type which is either GET or POST as I am retrieving data so my request will be GET and the URL of the server which I have store in the serverURL which is either a relative or absolute URL may be used here. If an absolute URL is being used, most browsers implement a same-origin policy, meaning the URL being requested must be on the same domain as the domain from which the URL is being requested. and last parameter is for how request should be issued: True for asynchronous; False for synchronous.
In the next statement I have set the Header of the getSystemuser object and set the return type to json. and then set the onreadystatechange event for the asynchronous operation and then send the request by passing the null object.
At the end I have loop throught the retrievedUser collection and shown the full name of the user.The output of the request can be seen in the Image 1 which is displayed using the Json Viewer which is used to show the Json data in tree format. Hope you get idea of how to use the Json in OData to retrieved data using Microsoft CRM 2011.
All and any comments / bugs / suggestions are welcomed !