i'm trying to create a version of my unlocked package. It contains like 3 sobjects and 2 classes. In my objects i have fields, which are related to other custom objects from the target system. The thing is i don't have access on the configuration of those fields. I just know that they do exist.

However when i generate the version of my package i get this error:

MyField__c.RemoteField__c: referenceTo value of 'RemoteField_vod__c' does not resolve to a valid sObject type

Is there some way to tell sfdx to ignore such things? Since i know that RemoteField exists in the targeting system.

1 Answer 1


To allow your package to include references to customization that's not part of your package or another package on which it depends, you'd need to build an org-dependent unlocked package.

This feature is in beta; it moves the validation of component references to install time instead of build time. Use the --orgdependent flag, e.g.,

sfdx force:package:create -t Unlocked -r force-app -n MyPackage --orgdependent
  • Thank you really much, this saved my life :D
    – Zero
    Commented Jan 13, 2021 at 7:10

You must log in to answer this question.

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