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
TanuTanu 

Unique field based of selection of particular value in picklist

I have created a custom object named oap. and created a look up field named oap id on opportunity. Also, there is one more custom field on opty named "revenue type"(its a picklist having value a,b,c). Now i want whenever user create or edit an opportunity, then it will restict user to select unique oap id if revenue type is "a".  if revenue type is b or c, user can enter the duplicate oap id.  Could you please help how to achive this?

Thanks 
Tanu