4

Is there anyway to create KnowledgeArticleViewStat test data for particular article types to use for Apex testing? I know that publishing an article requires the KbManagement.PublishingService class, however I don't see anything that can add fake data to the ViewStat part of a Knowledge Base Article.

Process__ViewStat p = new Process__ViewStat();
p.ViewCount = 1000;
insert p;

Returns a compile error of:

Field is not writeable: Process__ViewStat.ViewCount

Your Answer

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

Browse other questions tagged or ask your own question.