Skip to content
Bug Barometer

database.queryLocator object doesn't pass records to the execute() method for the __kav objects

Not fixed yet. Salesforce is reviewing it.

Summary

The database.queryLocator object in batch apex class doesn't pass records to the execute() method for the __kav objects for certain filter conditions. However, when iterable form is used, it works fine.

For example, when the query [1] is used, the execute() method does process the records successfully but it doesn't with the query [2]:

[1] SELECT KnowledgeArticleId, VersionNumber FROM Article__kav WHERE
IsLatestVersion = true AND KnowledgeArticleId IN :knowledgeArticleIds AND
PublishStatus = 'Archived'

[2] SELECT KnowledgeArticleId, VersionNumber FROM Article__kav WHERE
IsLatestVersion = false AND KnowledgeArticleId IN :knowledgeArticleIds AND
PublishStatus = 'Archived'

This reinterpretation of the query is due to the way that KnowledgeArticleVersion works internally. We are considering to document more details on this entity specific behavior in our documentation.

Workaround

We haven't loaded the full details for this issue yet. Check the official page.

History

  1. First tracked here as In Review with 2 reports

    Nov 30, 2026

Also open in Compute Services