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
fiona gentryfiona gentry 

How To Make Add validation message for Source Field in Case Object

Hi ,

i need add Validation message must be triggered only for ERT users,from the thread (https://developer.salesforce.com/forums/ForumsMain?id=9062I000000Ue3aQAC )
got solution as
AND($Profile.Name = 'ERT users', ISBLANK(Settlement Dollar Amount), OR(RecordType.DeveloperName  = "recordtype_first",
RecordType.DeveloperName = "recordtype_second"))

Now i want to add a source picklist values in above rule ,how to do that where we have source picklist values as STR1/STR2, str3 - str4, and Str5 - Str6/Str7

Your help is appreciated

Regards

Fiona
Best Answer chosen by fiona gentry
AnkaiahAnkaiah (Salesforce Developers) 
Hi Fiona,

When you sould provide error message? 

As per your question, you can able to add picklist values like below.
 
AND($Profile.Name = 'ERT users', ISBLANK(Settlement Dollar Amount), 
OR(RecordType.DeveloperName  = "recordtype_first",
RecordType.DeveloperName = "recordtype_second"),
OR(ISPICKVAL(Source,'STR1/STR2'),
   ISPICKVAL(Source,'str3 - str4'),
   ISPICKVAL(Source,'Str5 - Str6/Str7')
   ))

If this helps, Please mark it as best answer.

Thanks!!