[SalesForce] How to resolve deployment error: “Error: Invalid field:OPPORTUNITY.NAME in related list:RelatedCampaignInfluence2CampaignList”

While attempting to deploy a campaign layout that contains a related list for Campaign Influence, I get an error:

Error: Invalid field:OPPORTUNITY.NAME in related list:RelatedCampaignInfluence2CampaignList

Similarly, when attempting to deploy an opportunity layout that contains a related list for Campaign influence, I get an error:

Error: Invalid field:CAMPAIGN.NAME in related list:RelatedCampaignInfluence2List

I have enabled campaign influence in the target org but can't get past this error. How can I resolve this?

Best Answer

There are 2 types of campaign influence in Salesforce: "Campaign Influence" and "Customizable Campaign Influence".

When you "Enable Campaign Influence" through the setup menu you are only enabling "Campaign Influence". To resolve this error, you'll need to enable "Customizable Campaign Influence". To do this you will add the "CRM User" (aka "Sales User") Permission Set License Assignment to the user that is doing the deployments. You will then need to add the "CampaignInfluenceAccess" Permission Set to that user as well. See this article.

enter image description here

Related Topic