Generate Package.xml for your Salesforce Org with a single command

#1MinuteTip In Salesforce, the package.xml file serves as the manifest file for both deploying components and retrieving them from a Salesforce Org. It specifies the components that you wish to deploy or retrieve.

Here is a single command in Salesforce CLI that will generate the package.xml file for you.

sf project generate manifest --from-org <salesforce-org-alias>
sf project generate manifest

And here is the package.xml file that the command will generate for you.

package.xml generated by Salesforce CLI

You can use –type to specify the type of manifest you want to create such as the standard package.xml or destructiveChanges.xml to delete metadata.

You can also specify the metadata components that should be included in the manifest file. E.g. ApexClass, CustomObject etc.

Please refer to the following link for the reference document on this command.

References & Useful URLs

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top
Introducing All Access Pass