Explanation of the error
This Salesforce error that Gearset is surfacing is usually encountered when deploying a picklist or a new value for a picklist.
This issue often occurs because the metadata that Salesforce uses doesn’t quite line up to what the Salesforce UI would lead you to believe.
Example scenario
An example of this is picklist values on standard fields. For instance, the values of the "Account Source" field on the Account standard object.
The Salesforce UI makes it look as if the field actually stores the value, but the reality is that the values are stored in another metadata type called a Standard value set
and the actual field definition for "Account Source" field is only a reference to the Standard value set
.
Note: If you are seeing this error happen in a CI job, the resolution mentioned at the bottom of this article may be more relevant than the one below.
Resolution
For deployments made via "Compare and deploy" or non-Delta CI jobs
To resolve this issue try running a comparison that includes the Standard value set
, Global value set
and Custom object
metadata types in your filter. Or in case of a CI job, make sure your CI job's metadata filter includes all these metadata types.
You can then filter the Gearset result and find the changes you're interested in.
This suggested resolution is in line with our documentation on picklist changes on standard fields.
Resolution for Delta CI jobs
Is your Delta CI job deployment failing with this error?
Are you seeing a failing PR (pull request) that targets a Pipeline environment (CI job) configured as Delta CI job?
Based on various customer use cases, we have observed this validation error is more likely to occur when your CI job run is configured to be a Delta CI.
It may happen that the metadata filter for your Delta CI run doesn't include all the required metadata types, such as Standard value set
, Global value set
and Custom object
, for the validation to succeed.
This is usually due to the way Delta CI is designed to work - you can read more about Delta CI in this support article.
How to verify if my CI job is configured as Delta CI?
How to verify if my CI job is configured as Delta CI?
For the CI job in question, go to your CI dashboard and click Edit settings
.
Then in the Deployment behavior
tab under Synchronization type
you'll see this setting: "Only changes in the commit (Delta CI)"
If you're not the owner of the CI job, and cannot access Edit settings
option - check our guidance on how to preview settings for CI jobs owned by other users.
Workaround
A simple workaround for that is to consider deploying your changes via standard "Compare and deploy" feature. This is because you cannot amend your CI job setting for the job not to work as a Delta CI (effectively making it work as any other standard CI job).
Were picklist values amended directly in the target org?
Note: This is another possible use case, but may not be applicable to your scenario.
We have also seen this validation error surfacing during the CI job validation where, in a specific user case, the issue was that some picklist values were changed directly in a Salesforce org (the org that's the target of the CI job), but those values weren't amended in the repository (in the environment branch, the source of the CI job).
In this case even though you may be branching from your Master/Main branch when promoting changes, thinking it's your source of truth, but it isn't, and therefore you may face such validation issues.
How to resolve it?
The resolution would be to sync the changes made directly in the Salesforce org (CI target) with the environment branch (CI source) or promotion branch (specifically for pipelines) depending on what changes you prefer to keep before promoting new changes to this environment (via a pull request within Pipelines).
Note: If your environment branch (source of the CI job) is Main/Master, it is best to update the feature or promotion branch first to prevent risk of unintended changes in Production.
Does this error happen on a picklist value for a RecordType metadata?
Read below guidance on a workaround for when this error is surfaced specifically on a picklist value for a RecordType metadata.
We've troubleshooted a use case where a solution to this error was to change the RecordType
picklist value referenced in the error message to be a default value.
This is the error message investigated:
"Picklist value: %3F%3F A modifier in picklist: FRO_CV_c not found
"
The change can be done by replacing the XML of the failing component from (as highlighted in red on below screenshot):
<default>false</default>
to <default>true</default>
.
If the above solution doesn't work, we'd suggest to try to make other picklist values (highlighted above in blue) to be default values.
This advice is because sometimes Salesforce's error message may actually reference an incorrect picklist value as the component failing your validation!
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.