Explanation of the error:
This Salesforce error that Gearset is surfacing is usually encountered when attempting to deploy a CustomObjectTranslation
and Layout
that belong to a managed package. This is due to a known bug of the Metadata API that removes the managed package prefix. This then causes an error when the namespace does not match or include the managed package layout tag.
Resolution:
To resolve this issue, you will need to add the layout tag back to your deployment or remove the managed package component from your deployment.
β
Gearset will notify you via our problem analysis of any attempted changes that may fail your deployment like so:
β
However, if you want to deploy the component listed above π, you will need to get more creative.
β
As stated above, you will need to manually edit the XML of your deployment package by following these instructions like so:
β
Under the <Layouts>
tag, on the second line beginning with <layout>
, which may look as below (example):
<layouts>
<layout>Example Object Layout</layout>
<sections>
<label><!-- Address Information --></label>
...
</sections>
...
</layouts>
You'd need to amend it to <layout>NameSpace__Example Object Layout>
, as shown below:
<layouts>
<layout>NameSpace__Example Object Layout</layout>
<sections>
<label><!-- Address Information --></label>
...
</sections>
...
</layouts>
Note that the word "NameSpace__
" referenced in line:
β<layout>NameSpace__Example Object Layout</layout>
refers to the name of your managed package that the layout is a part of.
You should not add the exact wording of "NameSpace__
" to your XML file, as this will not resolve the error.
β
As per Salesforce documentation on Understanding Namespaces:
"A namespace is a 1-15 character alphanumeric identifier that distinguishes your package and its contents from other packages in your org."
β
Resolution if a failed component is deployed through a CI job
If the failing component in a CI or automation job, you may need to use our Environment Variables feature to apply and maintain those changes when pulling this metadata from your source.
Further examples of this Salesforce validation error can be found in:
Disclaimer: This error is returned by Salesforce directly, rather than Gearset. Even so, we offer guidance based on our combined experience with the Metadata API. Where possible, we try to help guide you to fix or avoid this error. In the case that this isn't possible, we may need to direct you to Salesforce support for further clarification.