Loading
ただいま大変多くのお問い合わせをいただいており、ご連絡までにお時間を頂戴しております続きを読む

sf package convert Fails with Metadata Resolution Errors When a 1GP Package References Metadata from a 2GP Base Package

公開日: Jun 15, 2026
説明

Issue

When running sf package convert to convert a first-generation (1GP) managed package to a second-generation (2GP) package, the conversion fails if the 1GP package references metadata from a 2GP base package installed in the same packaging org (a "1GP-extends-2GP" scenario).

 


 

Error Messages

You may encounter one or more of the following errors during conversion:

1) An error occurred while trying to install a package dependency:

CustomField(<Object__c>.<Field__c>) referenceTo value of '<namespace>__<Object>__c'

does not resolve to a valid sObject type

 

2) An error occurred while trying to install a package dependency:

CustomField(<Object__c>.<Field__c>) The global picklist cannot be resolved

 


 

Cause

The 1GP package upload process uses a "spidering" algorithm to detect dependencies and record them in package.xml. This algorithm cannot detect 2GP packages as dependencies. As a result, when sf package convert runs, the 2GP base package is never recorded as a dependency and is never installed into the conversion build environment. Any metadata in the 1GP package that references the 2GP base package cannot be resolved, causing the conversion to fail.

 

 


 

Steps to Reproduce

  1. Install a 2GP base package into a 1GP packaging org.

  2. Create a 1GP package in that org whose metadata references the 2GP base package's metadata (for example, a custom field referencing a custom object or global picklist from the 2GP base package).

  3. Upload a version of the 1GP extension package.

  4. Run sf package convert against the 1GP package version.

  5. The conversion fails with one of the errors listed above.

 


 

Workaround

There is currently no workaround for this issue. The conversion engine has no way to add additional dependencies beyond what was captured by the 1GP upload process.

 


 

Additional Information

There is no official mandate or deadline for 1GP to 2GP package conversion, and no fixed end-of-support date for 1GP packages at this time. Customers blocked by this issue are not at risk of any compliance deadline.

解決策

A fix is planned for a future Salesforce release. This article will be updated when the fix becomes available.


ナレッジ記事番号

005386874

 
読み込み中
Salesforce Help | Article