Retrieve Page Layouts in Source Format

I also tried the below commands and it worked fine.

sfdx force:source:retrieve -x ./manifest/package.xml

OR

sfdx force:source:retrieve -m Layout

You may like to verify if you have the Layout attribute added in your package.xml


This has worked for me in VS Code, if at all you are open to this option.

  • Create a Project with Manifest
  • In the package.xml, specify the layouts (make sure you have it in package.xml), example as below:

    <types>
        <members>*</members>
        <name>Layout</name>
    </types>
    
  • Execute SFDX: Retrieve Source in Manifest from Org enter image description here


Retrieving specific layout:

sfdx force:source:retrieve -m "Layout:Account-Retail Account"
  • Object Name: Account
  • Layout Name: Retail Account