Lookup onchange error RRS feed

  • Question

  • Hi,

    I am using CRM 2011. I am fetching Account information on case lookup.

    I used oData service query. It is working fine but for some users it alert error like

    My script is

    function getContact(customerID) {
        var serverUrl = Xrm.Page.context.getServerUrl();
        var oDataUri = serverUrl + "/xrmservices/2011/OrganizationData.svc/AccountSet(guid'"+customerID+"')?$select=Telephone1";
        var jSonArray = new Array();
            type: "GET",
            contentType: "application/json; charset=utf-8",
            datatype: "json",
            url: oDataUri,
            async: false,
            beforeSend: function (XMLHttpRequest) {
                //Specifying this header ensures that the results will be returned as JSON.            
                XMLHttpRequest.setRequestHeader("Accept", "application/json");
            success: function (data, textStatus, XmlHttpRequest) {
                if (data && data.d != null) {
            error: function (XmlHttpRequest, textStatus, errorThrown) {
                alert("Error :  has occured during retrieval of the Product details");
     return jSonArray;

    If anyone has an idea please share with me.

    Thanks in advance.

    Tuesday, May 20, 2014 4:31 PM

All replies

  • Hi Riaz,

    The user  does not have enough priviliges to see the record. Pls give the user's security role to READ Account Entity.

    Friday, May 23, 2014 10:45 AM