Skip to main content
How to deploy a renamed label of a standard object

How to deploy a name change made in the "Rename Tabs and Labels" section in Salesforce using Gearset

Jacob Joshua avatar
Written by Jacob Joshua
Updated over 3 months ago

When using the Rename Tabs and Labels option in Salesforce, you can rename the tabs and labels on any of the objects listed.

In this example I rename the Description Label on Case from Description to This is the label I have renamed from Description.

Renaming the label using this method also bypasses the maximum restriction of 40 characters that Salesforce has on these fields.

This renaming then shows against the object in Salesforce.

When deploying this Standard Object with Gearset (Case.Description in this instance), the change in the label will not show against the custom object itself and the label field will not be pulled for the object over the metadata API.

If no other changes have been made to the object, the object will show as no difference in a comparison.

To see the new label, the CustomObjectTranslation metadata type needs to be included in your metadata filter along with the CustomObject metadata type.

The label name change will then show in your comparison as a Custom object translation, which can be selected and deployed to your target.

In this example, this shows as Case-en_US

Salesforce metadata API limitations.

When deploying labels from one Salesforce organization to another, users may not find a "Custom Object Translation" file if there are no changes from the default name. This can lead to confusion, as no file will be available if no changes exist. To deploy the default name, the custom field itself needs to be included, and the translation file is only referenced if there is a change from the default.

From this example below from my Salesforce Org. The default name for the below fields are all same except for Mobile - Mobiles. Hence they won't be retrieved in the comparison.

For instance, when I attempt to deploy the Contact "Name" field, which is set to the default as above screenshot, I cannot find it during a comparison.

This is because Salesforce treats default field labels differently from custom translations. A "Custom Object Translation" file is only generated if the label differs from its default value. If the name matches the default, no translation file is created or needed.

Now I'm going to change the Name to Names and do a comparison.

I can now see the value in the comparison because the Salesforce Metadata API detects that a change has occurred.

Another limitation with translations is that the API can add existing <translation> elements to custom object translations, but it cannot delete them.


โ€‹

Did this answer your question?