Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 9244

How to connect to the CRM 2011 online webservice in REST (Jscript)?

$
0
0

I have find this website from microsoft msdn (http://msdn.microsoft.com/en-us/library/hh223541.aspx) where they are talking about CRUD functionality in REST (Jscript). there is also an example available which you can download: OptionSetSampleJScript.zip . When I download it and press F5 in Visual Studio, it gives me an error. Thats normal because I didnt enter my crm online url somewhere. I have find the location where the url is defined and found this piece of code:


var ServerUrl = this._Context().getServerUrl();
  if (ServerUrl.match(/\/$/)) {
   ServerUrl = ServerUrl.substring(0, ServerUrl.length - 1);
  }
  return ServerUrl + "/XRMServices/2011/OrganizationData.svc";


I have change it to:


var ServerUrl = "https://mycompany.crm4.dynamics.com";
  if (ServerUrl.match(/\/$/)) {
   ServerUrl = ServerUrl.substring(0, ServerUrl.length - 1);
  }
  return ServerUrl + "/XRMServices/2011/OrganizationData.svc";


I have run the application again, and it gives me another error. Access denied. How can I access my crm 2011 online webservice to do some crud functionity in REST?


ps. On the website of microsoft msdn they say this is also possible for CRM 2011 online.


Viewing all articles
Browse latest Browse all 9244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>