Calling Organization.svc from JavaScript in CRM 2011.

Hi,

There is a SOAPLogger tool that ships with CRM 2011 SDK which can be used to capture HTTP request and response.

http://msdn.microsoft.com/en-us/library/gg594434.aspx

Using that tool we can write our code in C# and it captures the corresponding SOAP Request and Response for it in a file named Output.txt, which we can then use in our JavaScript.

Sample SetStateRequest code

Request


Response

I have simply modified the tool to output the JavaScript as well which we can then use in onload or onchange event in CRM.

JavaScript

Download

Hope it helps.


Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

Share your thoughts

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 )

Google+ photo

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

Connecting to %s