19

I'd rather not have to type out all the metadata types in the package.xml but i'm not seeing any other way to do it?

1
  • You might have to use a separate tool like the Package Builder at the free cloudtoolkit.co site. Mar 8, 2019 at 6:18

4 Answers 4

28

You can use this VS Code extension

Salesforce Package.xml Generator Extension for VS Code

This extension provides an User Interface to choose metadata components for Package.xml file for development against sandboxes or DE orgs (Org Development Model with VS Code). This is similar to Eclipse Force.com IDE Add/Remove Metadata Components option.

Affiliation : I am the developer for this extension. It is free to use.enter image description here

3
  • 1
    +1 from me @Vignaesh, it is helpful !!
    – Sfdc_1184
    Jun 8, 2020 at 0:24
  • Vignaesh Ram good extension, but is there a way to stop 'Processing Metadata' command? After click 'select all' button, the extension is automatically processing all of the selected metadata components which seems unnessessary when you only want to get all of the metadata.
    – Lanjinest
    Feb 25, 2021 at 2:56
  • Once you've saved your manifest.xml the next step to actually download the metadata is to run the command: SFDX: Retrieve Source in Manifest from Org Dec 14, 2023 at 16:04
10

You can now use the org browser in VSCode to retrieve specific metadata types or individual files: https://developer.salesforce.com/tools/vscode/en/user-guide/org-browser/

4

Have you tried wild card *? It will retrieve all custom metadata of the org

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">

    <types>
        <members>*</members>
        <name>CustomMetadata</name>
    </types>
    <version>45.0</version>
</Package>
2
  • 1
    Has anybody had any success using this wild card with sfdx? I know it works using ant... but I keep getting an error when using sfdx force:source:retrieve. Here is the error:ERROR running force:source:retrieve: The specified metadata type is unsupported: [Custom​Metadata]
    – Rodrigo
    Sep 17, 2020 at 15:35
  • 1
    Yes @Rodrigo. This works for me now (version 50.0).
    – lemming
    Jun 21, 2021 at 16:08
2

I created a Package.xml that contains all the metadata types and wildcards so you can pull down the whole org.

The Gist is here: https://gist.github.com/shanerk/d9fec40ddd096cac44cab6d2fd16f5c2

That being said, the Salesforce Extensions for VSCode have native functionality to retrieve all the org metadata which should be used unless you have a compelling reason for a more customized process.

3
  • 1
    The wildcard doesn't seem to work for some metadata such as the custom object.
    – Bahman.A
    Mar 8, 2021 at 16:36
  • Do not trust wildcard and the wildcard does not work for all of metadata types.
    – Cray Kao
    Aug 9, 2021 at 3:26
  • This definitely works for most scenarios and has been used by many folks. Additional info in the comments on the Gist gist.github.com/shanerk/…
    – Shanerk
    Feb 23, 2023 at 20:08

You must log in to answer this question.

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