Retrieve Visualforce pages Post author:Swapnil Jaiswal Post published: November 11, 2024 Post category:Blog / Salesforce Post comments:0 Comments Find how to retrieve Visualforce pages from Salesforce org using manifest file & SFDX Summery: Retrieve Single VF PageRetrieve Multiple Visualforce PagesRetrieve All Visualforce pagesFetch Visualforce pages with SFDX Pro Tip: Visualforce pages are refer as ApexPages. Retrieve Single Visualforce page <?xml version="1.0" encoding="UTF-8"?> <Package xmlns="http://soap.sforce.com/2006/04/metadata"> <types> <name>ApexPage</name> <members>CommunitiesLogin</members> </types> <version>62.0</version> </Package> Fetch Multiple Visualforce pages <?xml version="1.0" encoding="UTF-8"?> <Package xmlns="http://soap.sforce.com/2006/04/metadata"> <types> <name>ApexPage</name> <members>CommunitiesLanding</members> <members>CommunitiesLogin</members> </types> <version>62.0</version> </Package> Retrieve All * Visualforce pages <?xml version="1.0" encoding="UTF-8"?> <Package xmlns="http://soap.sforce.com/2006/04/metadata"> <types> <name>ApexPage</name> <members>*</members> </types> <version>62.0</version> </Package> Retrieve Visualforce pages with SFDX sfdx force:source:retrieve -m ApexPage:VisualforcePageName What is ApexPage in Salesforce? Visualforce pages are stored as the ApexPage metadata type. Retrieving them gives you the .page markup file and a small meta XML file for each page. Steps to retrieve it in VS Code Open your Salesforce DX project in VS Code and authorize your org with SFDX: Authorize an Org.Open manifest/package.xml, or create the file, and paste the XML shown above.Right-click package.xml and choose SFDX: Retrieve Source in Manifest from Org.When the command finishes, open the folder force-app/main/default/pages to see the retrieved files.Use the API name of the page. Use * to retrieve every Visualforce page in the org. Retrieve it with the Salesforce CLI If you prefer the terminal, run one of these commands from your project folder:sf project retrieve start --manifest manifest/package.xml sf project retrieve start --metadata ApexPage:CommunitiesLogin Where the files are saved After a successful retrieve, the files are placed inside your project, for example in force-app/main/default/pages/CommunitiesLogin.page. Common problems and fixes Entity of type ApexPage cannot be found: check the spelling and the API name of the member, and make sure you are authorized to the correct org.Nothing was retrieved: run sf org list to confirm the default org, and check that the component actually exists there.API version: the examples use version 62.0. You can use a higher version if your org supports it. FAQ Why is the type called ApexPage and not VisualforcePage?ApexPage is the name the Metadata API uses for Visualforce pages.Do I also need the controller?Yes, if the page uses a custom controller. Controllers are Apex classes, so add the ApexClass type to the package.xml. Looking for Job Change? Find company wise Salesforce Interview Questions Here: TCS Salesforce Deloitte KPMG L & T Infosys Lirik Capgemini TechAim Bajaj Finance EY Logixal Hexaware Tech Workday Apisero You Might Also Like Tavant Salesforce Interview Questions December 17, 2024 Salesforce Admin Real Interview Questions Quiz – 35 Questions Asked in Actual Interviews September 29, 2026 IBM Salesforce Interview Questions Oct 2026 (Performance & Integration) October 10, 2026 Infosys 2025 Salesforce Developer Interview Questions. March 30, 2025 SOQL Result when Multiple Records having the same Name April 15, 2025 How to fetch all record types of any object in lwc salesforce. January 21, 2022 Leave a Reply Cancel replyCommentEnter your name or username to comment Enter your email address to comment Enter your website URL (optional) Save my name, email, and website in this browser for the next time I comment.
Salesforce Admin Real Interview Questions Quiz – 35 Questions Asked in Actual Interviews September 29, 2026