3

When trying to query FieldDefinitions through SOAP API, I get the following error:

[UnexpectedErrorFault [ApiFault  exceptionCode='EXTERNAL_OBJECT_UNSUPPORTED_EXCEPTION'
 exceptionMessage='FieldDefinition: a filter on a reified column is required.'
]
]

I couldn't find anything about querying FieldDefinitions in the official SF docs.

Does anyone know what's a reified column for Salesforce and how to query FieldDefinitions?

Thanks a lot!

Haris

  • what do you mean by the FieldDefinition? Do you mean the Fields on the SObjects? can you please share your request xml? – Rajiv Bhatt Apr 28 '15 at 9:16
  • Thanks for your comment, Rajiv. FieldDefinition is a standard object. I'm using Java to make requests. – Haris Osmanagić Apr 28 '15 at 9:35
  • sorry for my ignorance but I am not aware of any such standard object. Which Salesforce application (sales, service or marketing cloud) are you connecting? – Rajiv Bhatt Apr 28 '15 at 9:46
  • Here's a link to the object: salesforce.com/us/developer/docs/api_tooling/Content/… . I'm accessing users data through SOAP API? – Haris Osmanagić Apr 28 '15 at 10:32
5

The error message is not very user friendly but what it hints is to provide at least one filter while querying FieldDefinition.

For example you can filter the query by using EntityDefinition

Example

select id,DataType,NamespacePrefix,DeveloperName 
from FieldDefinition 
where EntityDefinition.QualifiedApiName = 'Account'

When we remove the where clause from the query we would see the same error that you have reported.

The Tooling API developer's guide for Summer'15 is updated with some query examples.

  • Great! Thanks a lot. One question on the fly: What's the difference between FieldDefinition and Field? – Haris Osmanagić Apr 28 '15 at 11:22
  • I am sorry but Field in context of tooling api or some other context? coz i dont see anything like Field available in the tooling api. – Rajiv Bhatt Apr 28 '15 at 11:39
  • In the context of SOAP API, since there's Field and FieldDefinition in the SOAP API. – Haris Osmanagić Apr 28 '15 at 13:17

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.