3

I tried to query a set of objects using REST API. But when I query a custom object I am getting the following error.

[{"message":"\nselect id from test_object3__c\n ^\nERROR at Row:1:Column:16\nsObject type 'test_object3\__c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.","errorCode":"INVALID_TYPE"}]

PS: I use describeGlobalSObjects() to get the object names, the object status is deployed and I have access to the object.

UPDATED

I have a list of object names stored in lstObjects and I am hitting the REST API to get the record count of each object.

foreach (string ObjectName in lstObjNames) {
    jsonResult = HttpGet(token.instance_url + @"/services/data/v26.0/query/?q=select+id+from+" + ObjectName, "");
    lstJsonResult.Add(jsonResult);
    RecordCount = FetchValuefromJSON(jsonResult);
}

Can anybody help me out with this?

  • 2
    could you please add some code ?are you using standard REST API? – Mohith Shrivastava Mar 15 '13 at 13:20
  • 1
    is there a namespace? – George S. Mar 15 '13 at 20:12
  • @user227: No, there is no namespace. – Vijay Prakash Mar 18 '13 at 5:50
  • @MohithKumar: Updated the question. – Vijay Prakash Mar 18 '13 at 5:58
  • Do you get anything at this url "/services/data/v35.0/sobjects/Test_Object3__c"? If not do you see the object at this url "/services/data/v35.0/sobjects"? – techbusinessman Jan 23 '16 at 0:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.