Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sfdx force:source:retrieve -m CustomMetadata fails #457

Closed
mshanemc opened this issue Jun 26, 2020 · 6 comments
Closed

sfdx force:source:retrieve -m CustomMetadata fails #457

mshanemc opened this issue Jun 26, 2020 · 6 comments
Labels
bug Issue or pull request that identifies or fixes a bug

Comments

@mshanemc
Copy link
Contributor

mshanemc commented Jun 26, 2020

Summary

sfdx force:source:retrieve -m CustomMetadata fails against non-scratch orgs

Steps To Reproduce:

Create a non-scratch org and auth to it
sfdx force:source:retrieve -m CustomMetadata

I can't reproduce it with a scratch org because the command works against scratch orgs.

Expected result

Source retrieves

Actual result

$ sfdx force:source:retrieve -u platformers -m CustomMetadata
ERROR running force:source:retrieve: The "path" argument must be of type string. Received type object

Additional information

Fails against both production and full sandbox
Also fails when trying to pull using the OrgBrowser in vscode...same command underneath in the Output
sfdx-cli/7.61.0 darwin-x64 node-v12.14.0

$ sfdx plugins --core
@mshanemc/sfdx-migration-automatic 0.3.1 (link) /Users/shane.mclaughlin/code/sfdx-migration-automatic
@oclif/plugin-autocomplete 0.2.0
@oclif/plugin-commands 1.2.3 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.7.10 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/analytics 0.17.0 (link) /Users/shane.mclaughlin/code/sfdx-analytics-plugin
@salesforce/lwc-dev-server 2.2.0
├─ @oclif/plugin-help 2.2.1
└─ @oclif/plugin-update 1.3.9
@salesforce/sfdx-diff 0.0.6
@salesforce/sfdx-trust 3.0.7 (core)
analytics 1.7.1 (core)
evergreen 0.22.10
└─ evergreen-build 0.11.1
generator 1.1.2 (core)
salesforcedx 48.19.0
├─ @salesforce/sfdx-plugin-lwc-test 0.1.5
├─ custom-metadata 1.0.1
├─ salesforce-alm 48.20.0
└─ salesforcedx-templates 48.18.0
sfdx-cli 7.61.0 (core)
shane-sfdx-plugins 4.37.1 (link) /Users/shane.mclaughlin/code/shane-sfdx-plugins

OSX 10.15.5 (19F101)

@mshanemc
Copy link
Contributor Author

I got this to work--it looks like if the cmdt object is in a packageDirectory that isn't the default, and the pull tries to put the CustomMetadata into a different packageDirectory that is the default, you get this error message.

@clairebianchi clairebianchi added the bug Issue or pull request that identifies or fixes a bug label Aug 25, 2020
@mdonnalley
Copy link
Contributor

This is no longer reproducible with the latest version of the CLI

@banderson5144
Copy link

How come using this command works sfdx force:source:retrieve -m CustomMetadata but if I specify a wildcard in a package.xml and do sfdx force:source:retrieve -x package.xml I get this error The specified metadata type is unsupported: [Custom?Metadata]

@shanerk
Copy link

shanerk commented Oct 16, 2020

Note CustomMetadata works but not Custommetadata (case sensitive).

@alexferrari88
Copy link

alexferrari88 commented Mar 31, 2021

In package.xml I add:

<types>
   <members>*</​members>
   <name>Custom​Metadata</name>
</types>

This is what the Salesforce documentation suggests. Yet I get the error:
ERROR running force:source:retrieve: The specified metadata type is unsupported: [Custom​Metadata]

Using the command sfdx force:source:retrieve -m CustomMetadata as suggested by @banderson5144 here, it works.

This doesn't make much sense...

@joelemmer-cko
Copy link

joelemmer-cko commented Jun 21, 2021

@alexferrari88 Using:

<types>
   <members>*</​members>
   <name>Custom​Metadata</name>
</types>

works for me. It exports all metadata.

It would have been better for me to be able to specify the API name of the particular metadata object, or use some sort of filtering, but that doesn't seem possible.

The only other package.xml configuration that worked was to pull out specific metadata records by specifying their unique fullName. e.g.:

<types>
   <members>MyCustomMetadataObject.uniqueMetadataRecordName</​members>
   <name>Custom​Metadata</name>
</types>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug
Projects
None yet
Development

No branches or pull requests

7 participants