Happy New Year, fellow admins!!
Have you got an SFDC Admin resolution this year? I sure do. My resolution is to make it impossible for users to create an opportunity without a contact role. This has not been easy to do, but I think it’s finally possible with a combination of configuration and one awesome free app!
Step 1: Remove the “New Opportunity” button from your Account page layouts.
This is the easiest change to make. Just go to Setup | Customize | Accounts | Page Layouts, go to the Related Lists section while in edit mode, and click the little wrench icon on the Opportunities related list.
In the new window that opens up, go to the “Buttons” section, and uncheck the box next to “New.”
Then click “OK” – and then make sure to save the layout!
Warning: if you have users who habitually create their opportunities from accounts, they may freak out when they find the button gone. It is always a good idea to send out a communication when making a change like this, with instructions for the correct way to create a new opportunity. In this case, I recommend directing your users to the contact page (rather than the account), where they can still create a new opp from the related list – and have a contact role on their opp.
Step 2: Remove the “New” button from the Opportunity tab.
This actually cannot be done with standard Salesforce functionality. One way to do this would be to replace the standard Opportunity tab view with a Visualforce page. That sounds lovely, but what if you don’t know how to create a Visualforce page? You’ll be happy to know, there’s an app for that. A free app! The Standard Tab Overrides app allows you to remove the New button from a standard tab, such as Opportunities, to prohibit creation of a record from that page.
- Download the app here.
- Once installed, follow the configuration instructions (Note: these instructions are Account-specific – I substituted Opportunity where needed), which will walk you through the following steps:
- Get the List View ID
- Override the tab’s home page
- Disable the tab’s “New” button
The list view ID is important, because it you need to set a default list view for when users navigate to the Opportunities tab – I recommend using the Recently Viewed Opportunities list view, because it is closest to what a user would see when they have the normal tab view – without a “New” button!
Step 3: Remove the “Create New” component form the left-hand sidebar.
Sadly, this list is not customizable (and until it is, please vote up this idea!). To truly enforce Contact Roles on Opportunities, you’ll need to remove the component from the sidebar entirely. This may or may not be an option for you – if not, keep reading and try the app below! If you do want to remove it, here’s how:
- Go to Setup | Customize | Home | Home Page Layouts
- Edit the layout(s)
- In the “Select Narrow Components to Show” section, uncheck the box next to “Create New” and then save. Done!
Bonus: Do you have more granular requirements for Contact Roles on an opportunity? Do you require a certain number of contact roles at specific stages, or require a Primary contact role? I’ve got another app for you!
The Opportunity Contact Roles Validation app allows you to decide which opportunity stage and/or probability requires a contact role, a primary contact role, or multiple contact roles. This app creates two Opportunity fields – “Number of Contacts” and “Primary Contact Assigned” – and updates them with an Apex trigger.
The app also provides a default validation rule, which fires whenever there is no primary contact on an opp at 30% or higher – you can modify this rule to meet your own requirements, or create additional rules based on the new fields.
Note: Installing the app does not populate the data! You will need to mass update your opportunities for the trigger to fire.
Again – I can’t say this enough – communicate these changes to your users! Make sure that they know where they are expected to create new opportunities. Making changes without communication leads to user frustration, lower adoption, and general distrust of the system you want them to embrace.