2

I want to retrieve Compact layout to visual studio code from the source org. Currently I'm using following command.

sfdx force:source:retrieve -m "CompactLayout:Lead-English Courses"

But using this command , terminal returns "No Result found".

Can anyone help me to solve this out?

2 Answers 2

4

It seems you are using the compact layout label u need to use the API Name and then sfdx force:source:retrieve -m CompactLayout:Account.Mobile_Account_Layout

Note: the format for source: retrieve is objectAPI.compactLayoutAPI

1

Below are some useful sfdx commands for retrieval

  • Custom field

sfdx force:source:retrieve -m CustomField:ObjectApiName.FieldNameApi

eg:sfdx force:source:retrieve -m CustomField:Account.B2C_Fiscal_Year__c

  • Page Layout

sfdx force:source:retrieve -m Layout-"ObjectApiName.Page Layout Name"

eg:sfdx force:source:retrieve -m Layout-"Account.B2C Summer21 Courses"

  • Compact Layout

sfdx force:source:retrieveCompactLayout:ObjectApiName.CompactLayoutApiName

eg:sfdx force:source:retrieve -m CompactLayout:Account.B2C_Summer21_Courses_compact_layout

  • Record Types

sfdx force:source:retrieve -m RecordType:ObjectApiName:RecordTypeName

eg:sfdx force:source:retrieve -m RecordType:Account.B2C_Summer21_Courses

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .