2

I have two unlocked packages. One package defines a number of custom fields on the Opportunity object and the other defines page layouts and other configurations the Opportunity. I receive the following error when attempting to install the configuration package:

Cannot add component of type:Layout named:Opportunity-Opportunity Layout to another package because it is an installed component.

My questions are:

  1. Generally, is it possible to install two unlocked packages that share overlapping Metadata, e.g. the same custom object?
  2. If so, what else may account for the above error?
5

Generally, is it possible to install two unlocked packages that share overlapping Metadata, e.g. the same custom object?

One would need to be a dependent of the other if the exact same metadata exists. Note, however, that a custom object has many related components, which of which may be unique. For example, you might have a custom object, and a dependent package that has more fields to add to the object, or a new layout, etc.

If so, what else may account for the above error?

Exactly as it says, you can't have the same component in multiple packages. You can have different parts in different packages, as per above, but not the same exact component.

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.