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
SarisfdcSarisfdc 

Restrict to select one product for one opportunity

I want feature where user can select onle one product from the Pricebook for one opportunity.
Can any one suggest any way to achieve this
SalesFORCE_enFORCErSalesFORCE_enFORCEr
You can create a roll up summary field to store the count of products on an opportunity and then create a validation whcih will throw an error if the count is greater then 1.
Onesh ReddyOnesh Reddy
Hi Sarisfdc,

You can write a trigger on oppotunity to restrict the insertion of more than one Product.
Hope it helps you.

Regards,
Onesh.K​