Vlookup alternative for Opportunity object. - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Inno InnovationInno Innovation 

Vlookup alternative for Opportunity object.

Hey guys,

Is there an alternative to way (workaround) to use a vlookup validation on the opportunity object, as i know this only works with custom objects.

What i basically need is two validation rules to ensure that when an opp is saved, the value in CW_Project_ID__c or CW_Ticket_Number__c is unique. If the value is null or zero, then that should be allowed.
 
Sudeep DubeSudeep Dube
Limitaion:
Expanding the VLOOKUP Formula for standard object
You can vote this Idea : https://success.salesforce.com/ideaView?id=08730000000BqPs

Also the other point and click Mathcing rule not supports the Opportunity object 
You can vote this Idea : https://success.salesforce.com/ideaView?id=0873A000000LlwDQAS

Solution for Your problem:
Create a before insert and before update triggerand put the checking criteria  to ensure the value in CW_Project_ID__c or CW_Ticket_Number__c is unique. if not then add error in trigger as it would behave as validation.