1

On executing: sfdx force:mdapi:retrieve -r ./mdapipkg -p ./ProjectComponents.xml I got the error message: metadata retrieve operation failed: INVALID_CROSS_REFERENCE_KEY: No package named

The file ProjectComponents.xml is ok - I used it in Workbench to retrieve and it works ok. Here is the file:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>Case.List_View_237</members>
        <name>ListView</name>
    </types>
    <version>51.0</version>
</Package>

1 Answer 1

1

sfdx -p refers to a Package Name, such as a Package or Changeset created in the Salesforce org. To use a Package Manifest file, use:

sfdx force:mdapi:retrieve -r ./mdapipkg -k ./ProjectComponents.xml

Where -k specifies the manifest file.

1
  • YES, you're right! I managed to get it to work. Also, I believe that the version has to be "34". Somehow I mucked through it and got it to work. Thank you for answering!!! Apr 12, 2021 at 22:21

You must log in to answer this question.

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