You need to sign in to do that
Don't have an account?
Del_Santos
Validation to verify if the value is valid
Hi,
I am thinking if this would be possible in validation rules.
I would like to create an object which will store a list of codes, let say, promo codes object.
Now, in the lead page, i would like to create a validation rule if the code entered by the user in the promo_code__c field is included in list of promo codes created under PROMO CODES object.
The only approach i can think is to hardcode all the codes in the rule.
ex.
OR
(
NOT(promo_code__c ="01566"),
NOT(promo_code__c ="03454"),
NOT(promo_code__c ="04546"),
NOT(promo_code__c ="04637"),
Err
Thanks,
Del
Thanks, matermorts for this information, however i am new to Apex.
Could someone help me on how to create this using Apex? :(
Basically, the requirement is to check the value being entered to promo_code__c field if existing from the collections of the promo code object..Sorry i know i should not suppose to let somebody do the homeowrk for me, but i could just not begin with the approach. :(
Thanks in advance
Hi there,
You need a trigger on the Lead object (before Insert).
In the trigger
I don't know your business rules, maybe you need to do this also for Updates.
Shouldn't be a big deal
Cheers,
M