I want to move some fields and some piece of functionality which we have developed but don't want to release yet to package extension.
But I have some both either with deployment to scratch org or with building a package.
I have two folders: base and extension. Base folder contains the base package and extension contains the metadata of the package extension.
If I have the file both in the base and extension folder like this
base/objects/CustomMetadata__mdt/CustomMetadata__mdt.object extension/objects/CustomMetadata__mdt/CustomMetadata__mdt.object extension package installation fails with an error
- Cannot add component of type:CustomObject CustomMetadata__mdt subjectId to another package because it is an installed component., Details: package.xml: Cannot add component of type:CustomObject CustomMetadata__mdt subjectId to another package because it is an installed component.
If I have only file in the base folder,
base/objects/CustomMetadata__mdt/CustomMetadata__mdt.object I receive an error when I try push the both codebase to my scratch org
{ "fullName": "CustomMetadata__mdt", "type": "CustomObject", "state": "Failed", "error": "Must specify a non-empty label for the CustomObject", "problemType": "Error", "filePath": "/CustomMetadata__mdt/CustomMetadata__mdt.object-meta.xml" }, How can I make it to work both for the deployment of unpackaged metadata to a scratch org and installation of package extension when built?