I have a commonly used object let's say object A it is being referenced in lookup's and formula fields. I have to create an unmanaged package without including "object A" how should I go about it?

2 Answers 2


What you are looking is not really possible. If a reference is being created, you cannot just exclude it from the package. The package compilation will fail in such scenarios.

For your use case, you can create an unlocked Package with just object A and then create a dependent package with other components (This new package has dependency to Package with Object A).

To learn more about dependent packages, checkout EasySpaces app sfdx-project.json


I was able to figure this out. We will have to use Org-Dependent Unlocked Packages. These packages are designed for specific production and sandbox orgs. You can install them only in orgs that contain the metadata that the package depends on.

Refer this link for more information.

You must log in to answer this question.

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