Thursday, October 18, 2012

Dynamics CRM 2011 JavaScript “Access is Denied” Error with OData call

Dynamics CRM 2011 JavaScript “Access is Denied” Error with OData call
In CRM 2011 on load of JS users geting ""Access is Denied" error if they have OData call
when they use the Xrm.Page.context.getServerUrl();

Use the below JS
document.location.protocol + "//" + document.location.host + "/" + Xrm.Page.context.getOrgUniqueName();