3

I was working on a scratch org and while pulling the changes got object translations for Lead back. Also I accidentally deployed these changes to an org.

Now when I am trying to delete or remove object translations, it gives me the following error when trying to deploy to the org:

The CustomObjectTranslation called 'Lead-en_US' is standard and cannot be deleted.

Any help is appreciated!

1 Answer 1

1

You can not delete ObjectTranslations by just putting them in a destructiveChanges.xml and doing a sfdx force:mdapi:deploy.

You either need to

  1. Disable Translations from the Translation Workbench in setup.
  2. Disable a language which you do not want to translate anymore in Translation Workbench.

If you want to reset any values that you've set for particular fields in a translation then you have to set the values as blank and then deploy your changes to the org.

ex:

If this is the value of your translation file Custom_Translated_Field__c.fieldTranslation-meta.xml:

<?xml version="1.0" encoding="UTF-8"?>
<CustomFieldTranslation xmlns="http://soap.sforce.com/2006/04/metadata">
    <label>Label In Translated Language</label>
    <name>Custom_Translated_Field__c</name>
</CustomFieldTranslation>

Then to reset its value replace the label with a comment like this:

<?xml version="1.0" encoding="UTF-8"?>
<CustomFieldTranslation xmlns="http://soap.sforce.com/2006/04/metadata">
    <label><!-- Nothing to see here --></label>
    <name>HealthCloudGA__SourceSystemId__c</name>
</CustomFieldTranslation>

And now deploy this sfdx force:source:deploy.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .