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
sfg1sfg1 

Save record only if it matches with any value of another field in the same custom object(Validation)

I have a Custom object Object__c with field  Paper_ID__c(Text datatype). I want to create another field  Paper2__c it should allow me to save the record only with any one of the Paper_ID__c field value. 

                 Paper_ID__c(Field name) 
Record1    123455
Record2    123456
Record3    123457
Record4    123458
Record5    123459

Paper2__c field should allow me to save only with 123455 OR 123456 OR 123457 OR 123458 OR 123459. 
If not it sholud through error. Please guide me in this.
Steven NsubugaSteven Nsubuga
Use a validation rule.
sfg1sfg1
Thanks for your reply Steven. My bussiness added one more criteria. I have done using Trigger.