I have created some custom case page layouts that I want to export as a file on my PC.

I want to do this to:

  • manage the case type definition with source control
  • deploy on another salesforce server by importing the exported file

How do I do that?
Is there a Rest API/admin web ui to get a case page layout definition?
Is there a Rest API/admin web ui to import the definition?

1 Answer 1


You can use a number of tools to import and export metadata. The primary recommended tool today is Salesforce DX. This free tool, provided by salesforce.com, can be downloaded from the site as an installable binary, or you can install NodeJS and run the command:

npm install -g sfdx-cli

Once installed, you can use DX commands to retrieve most of your metadata. There are some exceptions to metadata exports, for which manual setup is required. See the above link for exceptions.

Generally speaking, to export the data you want to a file on your PC:

sfdx force:source:retrieve -m StandardValueSet:CaseType -u [email protected]

And to deploy:

sfdx force:source:deploy -p force-app -u [email protected]

You can get all the details in the Salesforce DX documentation.

  • Thanks for your response. Case types it seems are not part of the (available case settings metadata](developer.salesforce.com/docs/atlas.en-us.api_meta.meta/…). No Rest API to get case types? Even something in the admin web UI would do.
    – Bohemian
    Commented Dec 16, 2020 at 4:41
  • @Bohemian It's not in Case Settings, it's in StandardValueSet.
    – sfdcfox
    Commented Dec 16, 2020 at 5:59
  • It looks like StandardValueSet can give me the names of case page layouts I have defined - is that right? If so, that's not what I need. I need the complete case page layout itself, exported (probably as XML - I don't care what format).
    – Bohemian
    Commented Dec 16, 2020 at 6:49
  • @Bohemian Yes, it's XML. The page layouts are in the Layout object. The CaseType StandardValueSet is literally just the picklist values of the standard field called Case Type. If you want to export everything case related, you need to export all of the StandardValue sets for cases, plus the case object itself, which would include layouts, validation rules, custom fields, sharing settings, etc. The backend is far more complicated than it looks when you're just using it as a user.
    – sfdcfox
    Commented Dec 16, 2020 at 8:25

You must log in to answer this question.

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