function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dyndragondyndragon 

Can't query ValidationStatus in KnowledgeArticleVersion

Hello,

I'm trying to query the Validation Status of a Knowledge Article Version, but even though it is documented here as a field, and my query seems correct, the error returning is that the ValidationStatus field does not exist in the sObject.

Query:
Select Id, Title, PublishStatus, OwnerId From FSBs__kav Where PublishStatus = 'Draft' AND ValidationStatus = 'WIP'
Error:
INVALID_FIELD: 
Where PublishStatus = 'Draft' AND ValidationStatus = 'WIP'
                                  ^
ERROR at Row:1:Column:91
No such column 'ValidationStatus' on entity 'FSBs__kav'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

The documentation for the KnowledgeArticleVersion says I'm using this right, but for some reason it's not working. Any ideas? I am testing my query with Force.com explorer 0.58A.
Best Answer chosen by dyndragon
ShashankShashank (Salesforce Developers) 
This could most probably be happening because of the API version that the force.com explorer is using. The validationstatus field is available only in API versions 24.0 and above. https://www.salesforce.com/developer/docs/api/Content/sforce_api_objects_knowledgearticleversion.htm

All Answers

ShashankShashank (Salesforce Developers) 
This could most probably be happening because of the API version that the force.com explorer is using. The validationstatus field is available only in API versions 24.0 and above. https://www.salesforce.com/developer/docs/api/Content/sforce_api_objects_knowledgearticleversion.htm
This was selected as the best answer
dyndragondyndragon
Thanks Shashank! You're absolutely right.

For those who might find this later, use workbench:
https://workbench.developerforce.com/login.php