function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Patrick Marks 2Patrick Marks 2 

Require Every new Opportunity to have a Contact Role

Hi all-

I'm trying to come up with a way to require every new Opportunity to have a Contact Role associated with it upon creation. The issue I'm running into is the stupid "Recently Viewed" Opportunity List View. It's the only place left that would allow a user to create an Opp without associating a Contact Role. I have a VF page that redirects the user to an error message when trying to create an Opp using this method. 
<apex:page standardController="Opportunity">
    Please create this Opportunity from the associated Contact.

This works great, except when I now create an Opportunity frome the Contact, there is for some reason no associated Contact Role on the Opp.
User-added image

Would really appreciate any direction here. Thanks!