[SalesForce] Deployment Error: Invalid field:** in related list:RelatedAccountContactRelationList
i am trying to deploy a package, i am getting 3 errors (the picture):
all these errors seem to be caused by a field called CONTACT.FULL_NAME, is that a valid field or you have another explications for this deployement error ?
Best Answer
I know this is a old post, but encountered the error today while deploying. Since no one answered, I thought of replying to the post.
The reason for this error is because the environment you extracted metadata from, has allows one contact to be related to multiple accounts. Setup can be found here ->
Enabling this creates a new object, 'Account Contact Relationship'.The target environment where you are deploying your code, doesn't have this setting enabled.
My production has this setting enabled, but the sandbox doesn't. I am not sure why this setting did not carry forward to sandbox. Nonetheless, making this change fixed all other errors I was getting.
In API version 30.0 and later, permissions for required fields can’t be retrieved or deployed. So make sure your profiles/permission sets don't reference any required fields.
"Since API version 30.0 a change set or ant deployment will fail if a field that is required in the field definition is included in a profile or permission set that is being deployed.
If you create a new custom field and check 'Required', Field Level Security automatically becomes 'Visible' for all profiles. Similarly, if you edit the definition of a custom field which is not visible to all profiles and check 'Required' then it automatically becomes visible to all profiles. Therefore there is no need to reference it in a permission set. Try it!"
It means, that you need to remove from profile metadata fieldPermissions of this field.
Best Answer
I know this is a old post, but encountered the error today while deploying. Since no one answered, I thought of replying to the post.
The reason for this error is because the environment you extracted metadata from, has allows one contact to be related to multiple accounts. Setup can be found here ->
https://help.salesforce.com/articleView?id=shared_contacts_set_up.htm&language=en_US&type=0
Enabling this creates a new object, 'Account Contact Relationship'.The target environment where you are deploying your code, doesn't have this setting enabled.
My production has this setting enabled, but the sandbox doesn't. I am not sure why this setting did not carry forward to sandbox. Nonetheless, making this change fixed all other errors I was getting.
Hope it helps