Skip to main content

Resolving validation errors - "Control field value <xxx> not found, valid values are <yyy>"

Cause and solution to this Salesforce validation error

Written by Valerio Chang

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 is because the metadata that Salesforce uses doesn’t quite line up to what the Salesforce UI would lead you to believe. 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 picklist value set and the actual field definition for Account Source is only a reference to the Standard picklist value set.

Resolution

To resolve this issue, update your comparison in Gearset by including Standard picklist value set, Global picklist value set and Custom object metadata types in your metadata filter.

You can then filter the Gearset result and find the changes you're interested in.
​
It may be that you're missing only one of the above metadata types in the filter, in which case make sure they're all retrieved before you re-validate the package in our app.

This validation error is also linked to Picklist value: <xxx> in picklist: <yyy> not found.

Why is the error still there after I include the value sets?

The values in the error come from the controlling field, so your comparison needs that field as well as the value sets. Managed packages sit outside the comparison filter by default, so a controlling field inside one is left out even when the value sets are included.

Check both:

  • The controlling field is included in your comparison.

  • If the controlling field belongs to a managed package, set Include managed packages to All or Choose in your metadata filter. See Comparing managed package metadata with Gearset for the full filter options.

Re-validate your package once you have added them.

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.

Did this answer your question?