You need to sign in to do that
Don't have an account?

VisualAccessMetrics
How to write trigger on VisualAccessMetrics? I am not able to view VisualAccessMetrics standardobject in the salesforce edition.
You need to sign in to do that
Don't have an account?
I found the below link can you please check if you have the right permissions.
https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_visualforceaccessmetrics.htm
Permissions stated in above link: " As of Spring ’20 and later, to access VisualforceAccessMetrics, users must have the Customize Application permission ".
Hope this helps please close the thread and mark the a best answer so that it can be useful in the future for others and it would also help us in keeping the community clean.
Regards,
Anutej
I am using Developer edition and have the "Customize Application permission " checked in. I am not finding the location of VisualAccessMetrics standard object to write the trigger on it.
If I may ask may I know how you are accessing the "VisualforceAccessMetrics"?
One of the way I fond was to query please find the details below:
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_tools_metrics.htm
Regards,
Anutej
This is my requirement. I need to find the location of VisualforceAccessMetrics to write a trigger on it.
VisualforceAccessMetrics is a standard table given by salesforce. The purpose of this table is to get some metrics around visual force page usages.
It has fields ApexPageId (Visualforce Page Id), DailyPageViewCount (The number of views received by the specified Visualforce page) and MetricsDate (date on which the VF page is accessed).
This table has around 1 million rows. Sample rows below
ApexPageId DailyPageViewCount MetricsDate
066o0000002vNFiAAM (Page A) 300 2017-07-25
066o0000002vNFiAAM (Page A) 100 2019-07-24
066o0000002v8yBAAQ (Page B) 50 2017-07-23
Metrics__c is a custom object with fields Total_Usages__c (Number type), Last_1_Year_Usages__c(Number type), Last_Access_Date__c (Date Field), VF_Page_Name__c(TextAREA type)
Write Apex Code to query VisualforceAccessMetrics table and store the results in the custom object.
E.g. For above sample data there should be following two rows created in Metrics__c table
VF_Page_Name__c Total_Usages__c Last_1_Year_Usages__c Last_Access_Date__c
Page A 400 100 2019-07-24
Page B 50 0 2017-07-23
C you help me out figuring this?