Sometimes we need to change the label or, more commonly, a value for a picklist item.
Suppose we do change the fullName
attribute of a picklist field, to match an external system that will integrate with the platform, for example. And we have the code in our repository and a sandbox where the code is deployed to.
On the first iteration, the fullName
is A
, but on the next iteration of the code, the external system's administrator realizes that s/he passed the wrong value, and it is actually B
. So of course, we change that on the fullName
of the value in your Field__c.field-meta.xml file.
However, if we deploy this modified metadata, we will get the "duplicate label" error when using sfdx force:source:deploy
:
Error src/objects/Object__c.object Object__c.Field__c Duplicate label: A's Label
Is there a way to force a deployment to change the current value, or maybe automate the deletion/replacement of the previous one?