+ 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;