Newer Version Available
UPDATE VIEWSTAT
Determine how many hits a Salesforce Knowledge article has had by using the UPDATE VIEWSTAT optional clause
on a SOQL query. You can get a view count for every article that you have access to
online.
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