How to Get Visualforce usage stats from VisualforceAccessMetrics in Salesforce

panoramic photography of green field
Reading Time: < 1 minutes

You can get the Visualforce usage statistics from the VisualforceAccessMetrics object in Salesforce by using SOQL (Salesforce Object Query Language) to query the object and retrieve the desired information. Here’s an example of how you can do this:

SELECT ApexPageId, MetricsDate, TotalTime, AverageTime, TotalRequests, UniqueUsers
FROM VisualforceAccessMetrics
WHERE MetricsDate = TODAY

This query retrieves the Visualforce page ID, date, total time, average time, total requests, and unique users for the current day. You can modify the query to retrieve data for a different time period by changing the value in the WHERE clause.

Once you have executed the query, you can use the results to get the desired statistics and usage information for your Visualforce pages.

,

About the author

Andrés Canavesi
Andrés Canavesi

Software Engineer with 15+ experience in software development, specialized in Salesforce, Java and Node.js.


Related posts


Leave a Reply

%d bloggers like this: