[SalesForce] Prevent users from adding more than one Products to an Opportunity

I would like to prevent users from adding more than one Product to an Opportunity (Number of Opportunity products must = 0 or 1) without using code. I have tried creating validation around the 'HasOpportunityLineItem' field but this can only be set to either True or False. Any ideas?

Best Answer

You should be able to add a RollUp Summary field to Opportunity that is a COUNT of Opportunity Products, then use a Validation Rule validate that it is either 0 or 1.

Related Topic