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
devsalesforce27devsalesforce27 

urgent: validation rules help

Hey, 

 

I have a situation in which I have particular number of codes in a single record in an object(object1__c). I have another object (object2__c)which have the same codes and all these codes are associated with a single key value. I want when a user selects the set of codes from object1__c , it should match look up to codes which are already present in object2__c and validate that there is a particular key value associated with these set of codes. If not , it should give an error. Any little help will be highly appreciated.

 

Regards

sfdcfoxsfdcfox
Take a look at the VLOOKUP function. Here's an example from the Help window:

AND( LEN(BillingPostalCode) > 0, OR(BillingCountry = "USA", BillingCountry = "US"), VLOOKUP( $ObjectType.Zip_Code__c.Fields.State_Code__c, $ObjectType.Zip_Code__c.Fields.Name, LEFT(BillingPostalCode,5)) <> BillingState )