Error overview
You may run into this error when attempting to deploy "Deleted" items in Gearset, in particular CustomObjectTranslation
components.
This issue may happen when you make a deployment via Compare and deploy (e.g. Git branch to org, or org to org), or with a CI job deployment (Git to org) in your Gearset Pipeline.
β
An example of the error message in our app would look as below:
"The CustomObjectTranslation called '<xxx>' is standard and cannot be deleted
"
In this case <xxx>
refers to a specific CustomObjectTranslation
component referenced by Salesforce.
What are "Deleted" items?
The "Deleted" items in your comparison are the ones that don't exist in the source environment, but exist in the target org.
Therefore, the deployment of a "Deleted" CustomObjectTranslation
would execute a deletion of such item from the target org.
β
Explanation of the error
The error happens because Salesforce Metadata API doesn't allow the deletion of CustomObjectTranslation
.
You can find more info in our documentation on which destructive changes does the metadata API not handle?
Resolution
If the error happens when running a direct Compare and deploy (e.g. Git to org / org to org validation), the workaround would be as follows:
In the target org, disable Translations from the Translation Workbench in Setup.
In Translation Workbench, disable the language which you don't want to translate anymore.
Workaround for a CI job in Gearset Pipeline
If the error is happening during a PR (pull request) validation in your Gearset Pipeline, follow these steps:
On the CI dashboard click on
Edit settings
for the CI job in question
βNote: It must be the CI job, or Pipeline environment against which the PR is being validated.Navigate to
Deployment behaviour
tab, and unselectDeleted items
checkbox.
Once done, you can re-validate the PR in your Pipeline.
This way CustomObjectTranslation
component won't be included in the CI deployment, so your PR should no longer report this error, and hopefully pass the validation (if no other errors affect the PR).
Workaround for Dev Sandbox Update in Pipelines
Is the validation error happening when you're trying use Updates feature to update a Dev org in your Gearset Pipeline?
β
Then follow the recommendation from this article: Resolving validation errors on Sandbox updates, where you'd need to click on the three dots icon (as on below screenshot), then Select items to deploy...
, and on the comparison preview unselect from deployment the CustomObjectTranslation
components that caused the validation error(s).
This should allow you to successfully Update your Dev Sandbox with any other changes.
Useful sources
More details on the issue can be found on Salesforce Stack Exchange forum.
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.