You need to sign in to do that
Don't have an account?
John Manager Training Dep
Get list of Visual Force pages, Apex classes, Triggers and aura components used?
Hi Team,
I want to get list of Visual Force pages, Apex classes, Triggers and aura components used?
For finding the VF pages used in the last 90 days, I am using the SOSL mentioned below,
SELECT Id, Markup, Name FROM ApexPage WHERE Id IN (SELECT ApexPageId FROM VisualforceAccessMetrics)
Can someone let me know if this is correct?
Als how do I get list of , Apex classes, Triggers and aura components used in last 90 days or so?
Many Thanks for all your help and support!
I want to get list of Visual Force pages, Apex classes, Triggers and aura components used?
For finding the VF pages used in the last 90 days, I am using the SOSL mentioned below,
SELECT Id, Markup, Name FROM ApexPage WHERE Id IN (SELECT ApexPageId FROM VisualforceAccessMetrics)
Can someone let me know if this is correct?
Als how do I get list of , Apex classes, Triggers and aura components used in last 90 days or so?
Many Thanks for all your help and support!
SELECT Id, Markup, Name FROM ApexPage WHERE Id IN (SELECT ApexPageId FROM VisualforceAccessMetrics where LogDate = LAST_90_DAYS)
For Aura you can get this list if you are on API version 43+.:
SELECT MetricsDate,UserId,TotalCount,PageName FROM LightningUsageByPageMetrics Where MetricsDate = Last_90_DAYS
I don't think there is any such API Object avaiable for APex classes and triggers
--
Magulan Duraipandian
www.infallibletechie.com
In the website - https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_tools_metrics.htm
i see that "Page views are tallied the day after the page is viewed, and each VisualforceAccessMetrics object is removed after 90 days."
I thought it meant that history is kept for 90 days. But based on the query it seems that history is available for much more than 90 days.
Is this a change?
Greetings to you!
List<ApexPage> apexPageList=[SELECT Id, Markup, Name FROM ApexPage WHERE Id IN (SELECT ApexPageId FROM VisualforceAccessMetrics) Limit 10000];
List<VisualforceAccessMetrics> vfPageList=[SELECT ApexPageId, DailyPageViewCount, Id, MetricsDate FROM VisualforceAccessMetrics LIMIT 10000];
System.debug('apexPageList-->'+apexPageList);
System.debug('vfPageList-->'+vfPageList);
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha.