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

URGENT: validation rules help



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.




Just for clarification, are these codes in a picklist, or does each code have its own record on the various objects?





record  id               code    

1                               a

2                               b

3                               c



Object 2

record id                 code           key value

4                               a                  x

5                               b                  y

6                               c                  z