The next step is to pull the existing metadata out of the org and into the project by using the package.xml file created in the previous step and a Salesforce CLI command. In the terminal window in VS Code, run the following command to retrieve the metadata identified in the package.xml file: sfdx force:source:retrieve -u DevHub -x./package.xml
- In the VS Code app, click File > Open.
- Select Documents and then select PackageXMLProject.
- Open PACKAGEXMLPROJECT and click the new file icon.
- Name the new file package. xml .
- Next, identify the metadata to be pulled by copying and pasting the following XML into package. xml. ...
- Click File > Save.
What is the use of package XML in Salesforce?
Package.xml is also useful if you are creating an unmanaged package, or if you want to grab only specific metadata components to deploy. If you don’t have any experience with these tools, that’s OK! For this project, you build an unmanaged package that will be used for the deployment and use the Salesforce CLI to do all of the heavy lifting.
How to include all metadata in a Salesforce project?
Well it depends on whether you want to include all the metadata in package.xml or specific, For a easy way you can created project in eclipse based force.com IDE and fetch medatadata from your salesforce org, this will create package.xml file for you for the matadata type you fetched in the eclipse. Let me know if this solves the problem.
What is sample package XML manifest file?
Sample package.xml Manifest Files This section includes sample package.xml manifest files that show you how to work with different subsets of metadata. A manifest file can include multiple <types> elements so you could combine the individual samples into one package.xml manifest file if you want to work with all the metadata in one batch.
How do I pull metadata from a XML file?
Be sure that you have all the components you want to grab properly listed and named in the package.xml file. Select Documents and then select PackageXMLProject. Name the new file package.xml. Next, identify the metadata to be pulled by copying and pasting the following XML into package.xml. Click File > Save.
See more

How do I download a package xml in Salesforce workbench?
1. Create a folder the package XML file in the root and a sub level folder with the component name. 2. Zip the folder....Check the following if applicable to the your scenario:Auto Update Package.Check Only.Ignore Warnings.Perform Retrieve.Purge On Delete.Rollback On Error.Single Package.
What is Salesforce package xml?
The package. xml is an xml file needed to retrieve the metadata source from a Salesforce instance (configuration and code) and deploy metadata (configuration and code) back to the org or to another Salesforce instance. It defines the various components of which your app consists.
How do I retrieve fields in xml package?
To retrieve a package, set the name of the package in the packageNames field in RetrieveRequest when you call retrieve() . The package. xml manifest file is automatically populated in the retrieved .
How do I retrieve metadata from Salesforce using package xml?
How To Retrieve All Metadata from Your Salesforce Org using package. xmlOption 1: Create a Sandbox.Option 2: Use package. xml with ANT or SFDX CLI.Option 3: Use a 3rd Party Extension or Tool.About this Guide.
Where is package xml in VS code?
Open the command palette (press Ctrl+Shift+P on Windows or Linux, or Cmd+Shift+P on macOS) and run SFDX Package. xml Generator: Choose Metadata Components command. In Choose Metadata Components for Package. xml page, select the Metadata you need and click on Update Package.
How do I retrieve packages from Workbench?
Navigate to https://workbench.developerforce.com then choose the environment and api version.Check “I agree to the terms of service” and click “ Login With salesforce”.In the Migration menu in the nav bar, click “Retrieve”Add your package. ... Now click on "Download Zip File" to get your export metadata.
How do I retrieve the custom metadata in a package xml?
How to Retrieve and Deploy Custom Metadata Types using ANTInclude Custom Metadata Type schema in package.xml using CustomObject tag.Include Custom Metadata Type records in package.xml using CustomMetadata tag.
How do I restore a package from Salesforce?
You can retrieve that package, unzip it to your local project, and then convert it to source format, all from the CLI....Before you begin, create a Salesforce DX project.Retrieve the metadata from the source org. ... Check the status of the retrieve. ... Unzip the zip file.(Optional) Delete the zip file.
How do I retrieve flow metadata in Salesforce?
Salesforce: Retrieving Metadata with Developer WorkbenchPrepare the Package. A. Using Package XML file. Save the file as package.xml or any other name. ... Developer Workbench. - Click Migration | Retrieve. - Select the XML file created for "Unpackaged Manifest" ... Extract and Find.
How do I create a package xml in Salesforce org?
Build a Package. xml ManifestIn the VS Code app, click File > Open.Select Documents and then select PackageXMLProject.Open PACKAGEXMLPROJECT and click the new file icon.Name the new file package. xml .Next, identify the metadata to be pulled by copying and pasting the following XML into package. ... Click File > Save.
How do I get my unlocked package in VS Code?
3:448:43Successfully Retrieve Org Metadata Using Salesforce CLI and PackagesYouTubeStart of suggested clipEnd of suggested clipYou can follow command sfdx for source retrieve and provide the name of the package.MoreYou can follow command sfdx for source retrieve and provide the name of the package.
How do I check Flexipage in Salesforce?
After creating flexipage tab, We have to tell Salesforce1 engine to display this tab in navigation menu of salesforce 1. Navigate to “Setup | Administration Setup | Mobile Administration | Mobile Navigation” and add Flexipage to navigation.
What is XML in Salesforce?
XML (Extensible Markup Language) is a text-based language that is used to identify, organize, and migrate metadata components. When working with XML and Salesforce metadata, (remember, “metadata” is referring to the components inside your org), you identify specific components in the XML file.
What is package.xml manifest?
This language tells the system interesting things like which specific metadata components to retrieve, deploy, or update. When we think of coding languages, most of the time we tend to think of object-oriented programming languages such as Apex, Java, or JavaScript. These languages bring some sort of action to the components you’re working with, like having a button execute a class, or sending an email. The XML language operates a bit differently.
What is metadata in XML?
What Is Metadata? Metadata are the assets in your org (assets being objects, tabs, classes, etc). These metadata assets are also called metadata components. For each metadata component you reference in the package.xml file (such as a custom tab for a custom object, Sticker__c), you receive a coded file.
What is Salesforce metadata?
Salesforce has a variety of tools you can use to work with the metadata in your org, such as change sets or the Salesforce command-line interface (CLI). When you’re deploying metadata, each of these tools serves a purpose and is very useful, depending on what you are aiming to accomplish.
What is metadata component?
A metadata component is an instance of a metadata type. Metadata types are the general classification for metadata components. For example, CustomObject is a metadata type for standard and custom objects. In the example below, the MyCustomObject__c custom object (a metadata component) is an instance of the CustomObject metadata type.
Create a New Project
To keep the unmanaged package and the project organized, it’s a good idea to create a workspace (or simply a directory folder) to store the metadata you are working with. Let’s create a new project to catch the metadata on your machine.
Build a Package.xml Manifest
The time has come for the first big step in our adventure. We’ve talked a lot about package.xml files, and now it’s time to build one yourself. As you write this file, keep in mind the names of the metadata components identified in this XML.
Pull Metadata Package from Playground
The next step is to pull the existing metadata out of the org and into the project by using the package.xml file created in the previous step and a Salesforce CLI command.
Create a Scratch Org
Next, create the scratch org that you’ll use to make changes to the metadata files and build more components for the sticker app.
Hands-on Challenge
You’ll be completing this challenge in your own hands-on org. Click Launch to get started, or click the name of your org to choose a different one.

Learning Objectives
A Different Approach
Metadata Components
What Is Metadata?
Different Types of Metadata Components
Metadata Tools
Behind The Curtain of package.xml
What Is Xml?
- XML (Extensible Markup Language) is a text-based language that is used to identify, organize, and migrate metadata components. When working with XML and Salesforce metadata, (remember, “metadata” is referring to the components inside your org), you identify specific components in the XML file. XML file is commonly referred to as a “package.xml mani...
Resources