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
kranjankranjan 

Error: sObject type 'Knowledge__kav' is not supported

We are using scratch orgs for our development and are facing very peculiar issue. Even when Knowledge feature is already ENABLED in the orgs, when we are pushing the code to our org or even when we are running simple query on SObject Knowledge__kav object.

Query below is giving this error
SELECT Id, Title FROM Knowledge__kav

Error: sObject type 'Knowledge__kav' is not supported

Pushing code with a Tab attached to standard Knowledge__kav object to scratch org is giving error:
no CustomObject named Knowledge__kav found

Any help is highly appreciated.
Cody Sanders 33Cody Sanders 33
If I'm not mistaken, the double underscore is not accepted in APIs except with the '__c' at the end of a custom object/field. I did some quick searches myself and it seems you could try 'SELECT Id, Title FROM KnowledgeArticleVersion' as an alternative? If that doesn't work there might be some problem with the sandbox type? I've not worked much with knowledge myself but I figured that this may give some points to look at.
Rahul Rana 32Rahul Rana 32
Hi kranjan,
How did you solve this issue?
Anna RudasAnna Rudas
You can use KnowledgeArticleVersion instead of Knowledge_kav reference.
Hope it helps.