0

I'm having issues deploying my mdapi output directory to my packaging org. I'm using SFDX and second generation packages. I'm almost considering trying to create a 1GP from my source. Do the following steps not work with 2GP? I understand you cannot distribute to client with 2GP but you should be able to deploy the metadata to a packaging org.

I'm creating the output directory - mkdir mdapioutput Converting to mdapi format from source format - sfdx force:source:convert -d mdapioutput/ Then attempting to deploy - sfdx force:mdapi:deploy -d mdapioutput/ -u golden-test -w 100

I'm getting 1409 component failures that so far seem to be exclusively apex components failures complaining that my objects and fields don't exist.

Is it not possible to deploy a 2GP's metadata?

1
  • Forgot to mention that this is a managed package.
    – Ben Baik
    Jun 13, 2019 at 17:19

1 Answer 1

1

For ISVs, you should register your developer namespace with your DevHub org, then you can create 2GP with the same namespace as your developer org. From there, you can directly install your 2GP in to the developer org without converting your metadata or manually deploying files. force:package:install should be all you need to do once you've registered your namespace and created your 2GP. Note that you can convert your DX source format files to MD-API format, and from there, deploy those, but you need to make sure you have all the relevant object and field files.

4
  • Forgive me for not mentioning this, but I am planning on uploading to the AppExchange. I have not had any problems installing packages so that would be good news. One concern I have is if I install the package and then connect that org to my Partner Portal, will I be able to list it on the AppExchange? I was under the impression that the package needs to be under "Package Manager" not "Installed Packages".
    – Ben Baik
    Jun 13, 2019 at 17:30
  • I just confirmed, after installing and connecting that org to the Partner Portal, package count is 0.
    – Ben Baik
    Jun 13, 2019 at 17:39
  • @BenBaik You still need to create your managed package; the 2GP eases metadata deployments. After you upload the managed package, it will then be available in the portal.
    – sfdcfox
    Jun 13, 2019 at 18:35
  • @sfdxfox After installing I can't see the components in order to add them to the package. Which is why I am trying to do the metadata deploy so that I can create and upload a package in the package manager. Metadata deploy isn't working for me though. I'm thinking you can't have a namespace if you want to do this.
    – Ben Baik
    Jun 13, 2019 at 18:57

You must log in to answer this question.

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