I have custom object in my RemedyForce abc__c and would like to get list of it.

Tried this code:

SearchResult sr = con.search(
                    "FIND {00008137} IN abc__c FIELDS RETURNING abc__c(Id, Name)");

but it returns

[InvalidSObjectFault [ApiQueryFault [ApiFault exceptionCode='INVALID_TYPE' exceptionMessage='sObject type 'abc__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.'

Tried this code too and it returns:

String sql = "SELECT Id, Name FROM abc__c LIMIT 10";
QueryResult result = con.query(sql);

[InvalidSObjectFault [ApiQueryFault [ApiFault exceptionCode='INVALID_TYPE' exceptionMessage='sObject type 'abc__c' is not supported.'] row='-1' column='-1' ]]

Anyone can advise how to get list of my custom object?


If the object is part of a managed package, it will have a namespace prefix. If the namespace is BMCServiceDesk, the object API name will be BMCServiceDesk__abc__c. This will apply to any custom fields within the object as well:

String queryString = 'SELECT Id, Name, BMCServiceDesk__Custom_Field__c'
    + ' FROM BMCServiceDesk__abc__c LIMIT 10';
  • Yes correct, actually the mistake is very silly. Please see my answer. – Rendy May 18 '15 at 3:35

Finally got this solved, actually the endpoint that is used in my application is wrong, that's why the custom object is not visible to logged-in user.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.