Skip to main content
All CollectionsTroubleshootingSalesforce validation errors
Resolving validation errors - "Invalid field <xxx> in related list:RelatedAccountContactRelationList"

Resolving validation errors - "Invalid field <xxx> in related list:RelatedAccountContactRelationList"

Cause and solutions to this Salesforce validation error "Invalid field <CustomField> in related list: RelatedAccountContactRelationList"

Mateusz Kochanowicz avatar
Written by Mateusz Kochanowicz
Updated this week

Error overview

You may run into this Salesforce validation error when deploying Layout metadata in Gearset.
​
An example of the error message would be as below:

"Invalid field:Contact.Contact_Type__c in related list:RelatedAccountContactRelationList"
​
In this particular case the failing component is Custom field Contact_Type on Contact object.

Explanation of the error

It is our understanding that Salesforce is not detecting that the field referenced in the error message is present in the target org, or Salesforce is unable to confirm if the field is present in the target (e.g. due to limited metadata filter used in your Gearset comparison).
​
It's also possible that your source and target environments are not aligned in terms of having this "Account Setting" enabled in the org: "Allow users to relate a contact to multiple accounts".

Resolution

To resolve the issue try one of the following troubleshooting steps, depending on the use case that applies to your deployment.


Scenario 1

  • If you have excluded Custom field metadata from your filter used in Gearset, we're not retrieving and comparing Custom fields.

  • While the field (referenced in the error message) may be required in the deployment package, in which case the recommendation is to retrieve Custom field metadata and include the field your deployment.

Scenario 2

  • The Custom field referenced in the error message is a new item in the source environment, and is not present in the target.

  • It's possible that the Layout you're deploying relies on this field being in the target, before it can be successfully validated.

  • In which case deploying the field to the target first (as part of a separate deployment), and then following up with the deployment of the Layout may help you resolve the error.

Scenario 3 (applies to org to org deployments)

  • Based on this source from StackExchange forum, some user explained that the reason for the error is that the environment you retrieved metadata from (source) has this setting enabled in the source Salesforce org, but may not have it enabled in the target org.

  • Resolution is to ensure that both source and target orgs have "Contacts to Multiple Account Settings" enabled. Once done, try to re-validate your deployment.

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?