1

I've installed a managed package in my scratch org, and now I want to retrieve the source.

sfdx force:mdapi:retrieve -s -r ./mdapipackage -p field_trip -u redacted -w 10

I get the error of:

ERROR running force:mdapi:retrieve:  The metadata retrieve operation failed: INVALID_CROSS_REFERENCE_KEY: No package named 'field_trip' found.

Because I don't know the accurate name, I've tried listing the installed packages with

sfdx force:package1:version:list

With no results.

What am I doing wrong?

  • try sfdx force:package:installed:list -u <user_name_goes_here> , to list the installed packages. – OK999 Nov 27 '17 at 20:29
0

sfdx force:mdapi:retrieve is only to retrieve from the package if you are in the org where the managed package is developed .

A managed package source code is generally hidden except the source code thats exposed by the vendor .

If you want to see the managed packages installed you will simply run the below using the username of the scratch org or alias

sfdx force:source:pull
| improve this answer | |
  • 1
    sfdx force:source:pull, doesn't show a managed package. – OK999 Nov 27 '17 at 20:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.