The Salesforce Developers website will undergo maintenance on May 29, 2024 from 3:00 a.m. UTC to 10:00 a.m. UTC. The maintenance process may affect the availability of our documentation. Please plan accordingly.

updateViewStat(articleOrVersionId)

Increases the article view count of a KnowledgeArticle or KnowledgeArticleVersion record.

updateViewStat uses this Knowledge Article View Stat Resource.

  • articleOrVersionId— (Required) The ID of the KnowledgeArticle or KnowledgeArticleVersion record.

This example shows how you can provide the record context to the articleOrVersionId parameter using @api recordId.

This button calls the updateViewStat() method.