I am currently deploying my Salesforce code to a qa sandbox environment with the mdapi (
sfdx force:source:convert ->
sfdx force:mdapi:deploy). However, we need the object and pages and etc when deployed to have a certain namespace. Is this possible?
Metadata will have a namespace in a small number of circumstances.
- It is installed as part of a managed package.
- It is present in a namespaced scratch org, and hence has the namespace of that org.
- (Slightly different) It is present in a packaging org and will have the namespace applied when uploaded, but doesn't present in the org with a namespace.
Metadata in a QA sandbox can have a namespace only if it is installed as part of the managed package that owns that namespace.
Under no circumstances can you create metadata in a namespace you do not control, i.e., own the corresponding packaging org.