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
JAY_PJAY_P 

validation rule new

Hey Developer.
I want to create one validation rule please help me...
i have three object 1.Mobile module type(field type : text and value which i entered is pc789)
2. active start mode which has (picklis-tfield type) value --- disabled,derated,normal operation
3. tamper level which has (picklist -field type) value --- tamperlevel1, tamperlevel2
 so i want to create one validate rule for if mobile module type value is pc789,
                          active start mode value is derated and tamperlevel value is tamperlevel2
it did not allow to add data in system or throw some error 
please help me???
thank you 
Best Answer chosen by JAY_P
Pramodh KumarPramodh Kumar
if(and( CONTAINS(Name, 'pc789'), ISPICKVAL( pramodht__active_start_mode__c ,'derated'), ISPICKVAL( pramodht__tamper_level__c ,'tamperlevel2')),true,false)

All Answers

Pramodh KumarPramodh Kumar
Here is the validation rule for your scenario and let me know if you have any other issuesUser-added image

Thanks,
pRAMODH.
 
JAY_PJAY_P
Hey Pramod 
Can you please write down that formula here???its hard to read ...
Pramodh KumarPramodh Kumar
if(and( CONTAINS(Name, 'pc789'), ISPICKVAL( pramodht__active_start_mode__c ,'derated'), ISPICKVAL( pramodht__tamper_level__c ,'tamperlevel2')),true,false)
This was selected as the best answer
JAY_PJAY_P
Hey Pramodh,
Its working properly but i got one error here if i take the value of active tamper level= disable and tamperlvel= tamperlevel2 then it save the data i want that rule if module type = pl789 
and active start mode = disabled and active tamper level= tamperlevel1 in this scenario it allow to insert data in salesforce .....


 
Pramodh KumarPramodh Kumar
hi mike,

the validation rule you created will fired only when all the condtions are satisfied.

In addition to the above rule do you have any other condition where you want to fire the validation rule. 
Please give me the exact condition so that i can change the validation.


Thanks,
pRAMODH.