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
abhishektandon2abhishektandon2 

Getting List of Visual force pages in my Org

Is there any way to get the List of Visual Force pages in My Org pragmatically?

Best Answer chosen by Admin (Salesforce Developers) 
abhishektandon2abhishektandon2

Thanks

All Answers

Ronak PatelRonak Patel

You can fire following soql on ApexPage object and get a list of all pages in the org :-

Select Id, Name,MasterLabel, ApiVersion from ApexPage

abhishektandon2abhishektandon2

Is this only possible only through web service API or can i use it via nomarl Apex code?

Ronak PatelRonak Patel

Just Use this SOQL query in Apex languge and APex code

 

 

List<Apexpage> lst=[select id,name from Apexpage];

Set<String> listApexpage=new Set<String>():

for(Apexpage temp:lst)

listApexpage.add(temp.name);

 

 

abhishektandon2abhishektandon2

Thanks

This was selected as the best answer