none
Access denied in MS CRM 2011 Java script Web service call

    Question

  • Hi,

    I am making webservice call using below code ,the code is working fine on CRM Server but from client machine it is giving error access denied .

    I think we need to pass some authentication for this call from client machine .

    Any help is highly appreciated .

    var odataSelect ="http://servername/organization/XRMServices/2011/OrganizationData.svc/OpportunitySet(guid'"+oppid[0].id+"')?$select=new_status"

    var retrieveRecordsReq = new XMLHttpRequest();
    retrieveRecordsReq.open("GET",odataSelect , false);
    retrieveRecordsReq.setRequestHeader("Accept", "application/json");
    retrieveRecordsReq.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    var temp= retrieveRecordsReq.send();
    if (retrieveRecordsReq.readyState == 4 && retrieveRecordsReq.status == 200)
     {
    var retrievedRecords = JSON.parse(retrieveRecordsReq.responseText).d
    }

    BR


    Saurabh
    Thursday, September 08, 2011 2:43 PM

Answers

All replies