Newer Version Available

This content describes an older version of this product. View Latest

Update View Statistics with the Salesforce Object Query Language

The UPDATE VIEWSTAT clause is used in a SELECT statement to report on Salesforce Knowledge article searches and views. It allows developers to update an article’s view statistics.

You can use this syntax to increase the view count for every article you have access to online:

1SELECT Title FROM FAQ__kav
2WHERE PublishStatus='online' and
3Language = 'en_US' and
4KnowledgeArticleVersion = 'ka230000000PCiy'
5UPDATE VIEWSTAT