function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Frances AllenFrances Allen 

Query Visualforce Pages

Besides using the documentation located here: 
https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_visualforceaccessmetrics.htm

What are other ways to query how many visualforce pages exist in your org? I feel like there is an easier way to do this, like looking under 
pages in setup? What special advantage does querying give you? 



 
Frances AllenFrances Allen
Also, this method does seem to work. What am I missing here? There errors I get are Missing '<EOF>' at 'return'
and invalid constructor name querylist.

public class SOQLQuery {
    public List<VisualforceAccessMetrics> Records {get; set;}
    
    public QueryList(){
    Records = [SELECT ApexPageId, DailyPageViewCount,Id, MetricsDate FROM VisualforceAccessMetrics];
    }
}

    return QueryList;