Validation rule to ensure Contact Role is assigned to Opportunity - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Kevin LeveilleKevin Leveille 

Validation rule to ensure Contact Role is assigned to Opportunity

I would like a Validation rule to ensure Contact Role is assigned to Opportunity but cannot see how this would work and am seeing a number of posts suggesting it is not feasible.  Any help would be appreciated, thanks.
Best Answer chosen by Kevin Leveille
Mavens AdminMavens Admin
+1 Jeff - I can vouch for that app. Chad also raises a good point - you would either need to adapt the app's validation rule to only perform this check when the opp is not new - NOT(ISNEW()) - or you would need to remove the New Opportunity button from the Account layout and train your users to create new opps through contacts only. 

All Answers

Chad MoutesChad Moutes
There really isn't a way to do this with validation rule, seeing ass you cant add contact roles until after the opportunity is created, you could possibly look into something like a formula field that you could place on the page that would say something until a contact role was added.
Jeff MayJeff May
There is a Salesforce Labs package on the AppExchange that rests for the existence of a Primary Contact on an Opp.  https://appexchange.salesforce.com/listingDetail?listingId=a0N300000016cbDEAQ
Mavens AdminMavens Admin
+1 Jeff - I can vouch for that app. Chad also raises a good point - you would either need to adapt the app's validation rule to only perform this check when the opp is not new - NOT(ISNEW()) - or you would need to remove the New Opportunity button from the Account layout and train your users to create new opps through contacts only. 
This was selected as the best answer