Skip to main content
All CollectionsTroubleshootingSalesforce validation errors
Resolving validation errors - "<xxx> is not a valid condition field for : <yyy>" on Duplicate Rule metadata type
Resolving validation errors - "<xxx> is not a valid condition field for : <yyy>" on Duplicate Rule metadata type

Cause and resolution to this Salesforce validation error

Mateusz Kochanowicz avatar
Written by Mateusz Kochanowicz
Updated over 5 months ago

This Salesforce validation error that Gearset is surfacing is likely to occur on the DuplicateRule metadata type during an org to org, or Git (branch) to org deployment.

On below example we're seeing the error:
<xxx> is not a valid condition field for : <yyy> - where <xxx> refers to a specific condition field, while <yyy> refers to a Custom object component that failed the validation (in this specific example it is "Sub Account Form").

Explanation of the error

Based on the information provided by Salesforce, this error can happen when you deploy changes to metadata that contains a DuplicateRule "with a condition that filters on a field that has a duplicate API name of a field on another object."

Resolution

Remove the condition from the Duplicate Rule (in your source org), and then try to validate and deploy in our app.

After a successful deployment, you can manually add the condition to the Duplicate Rule in the target org.

If you need more information on this error, such as steps to reproduce it, please check:
Salesforce Known Issues

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?