The purpose of this repo is just to unofficially collect a sample package.xml manifest and list metadata types for migrating Salesforce metadata using a package.xml manifest and the Salesforce CLI. This sample is not an exclusive list, but should be good to get started as users get familiar with writing a package.xml manifest.
Want to learn more about how to write a Package.xml Manifest? Check out Salesforce Trailhead badge Package.xml Metadata Management.
DISCLAIMER: This is not aiming to be an exhaustive list of metadata types in the package.xml manifest. This project is only sharing out a sample package.xml manifest with the wide variety of metadata types that can be used.
Getting set up.
- Make sure you have the Salesforce CLI installed. If you don't have it installed you can download and install it from here. If you do have it installed, then check to make sure you are on the latest by running
sfdx update
command. - Install VS Code.
- Install Salesforce Extension in VS Code.
There are many components within this project, but ultimately, the Package.xml
file is likely what you came here for. In this project, I have included an sfdx project structure, the package.xml sample manifest, and a list of resources below for you to learn more.
- SFDX Project with sample metadata (objects, fields, classes, perm sets)
- Package.xml file related to the objects in the sfdx project
- Sample package.xml file
- Helpful Resources
With specific commands, the Salesforce CLI absolutely can create a package.xml for you! The challenge though is not all metadata types are declaratively available through the UI (such as Profiles). So when the CLI creates the package.xml manifest off of a package, the metadata is limited to just those metadata components within that package.
Learning how to write a package.xml file and use it to retrieve and deploy metadata will also make you more of (what I affectionately call), a Legendary Salesforce Admin and Developer. The problem then becomes, what metadata type should I use? Well, thats where this project comes in! This package.xml sample is just that, a sample of metadata types and how they are written.
Awesome-sauce! You are more than welcome to contribute to this project. Please follow the development guides and best practices highlighted in the 'Resources' section of this document.
- Trailhead: Package.xml Metadata Management
- Salesforce Metadata API Developer Guide: Package.xml Sample Manifest
- Salesforce Metadata API Developer Guide: Metadata Types
DISCLAIMER: This project is not official documentation in any way or form. This project is of my own words. Always refer to the official documentation and training guides provided by Salesforce.