Retrieve Visualforce pages

Find how to retrieve Visualforce pages from Salesforce org using manifest file & SFDX

Summery:

  1. Retrieve Single VF Page
  2. Retrieve Multiple Visualforce Pages
  3. Retrieve All Visualforce pages
  4. Fetch Visualforce pages with SFDX

Pro Tip: Visualforce pages are refer as ApexPages.

Retrieve LWC with menifest file

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

Leave a Reply