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
Atul Shendge 2Atul Shendge 2 

validation rule when the call is saved or submitted, it checks the user's country and if it is different from FR, it shows an error

Hi All,

Hope you all are doing good, Need your help on below issue.

There is field xxxx which will be visible for all countries, It will be enable for all the country user including FR.
I need write a validation rule, when the call is saved or submitted, it checks the user's country and if it is different from FR, it shows an error

Regards,
Atul
Best Answer chosen by Atul Shendge 2
PriyaPriya (Salesforce Developers) 
Hi Atul,

You can try something like that :- 

Error Condition Formula:-
AND(

OR(
ISPICKVAL(call, 'Submitted'),
ISPICKVAL(call,'saved')),

$User.Country  <> 'FR'
)


If it solve the issue, please mark it as best answer.

Regards,

Priya Ranjan

All Answers

PriyaPriya (Salesforce Developers) 
Hi Atul,

You can try something like that :- 

Error Condition Formula:-
AND(

OR(
ISPICKVAL(call, 'Submitted'),
ISPICKVAL(call,'saved')),

$User.Country  <> 'FR'
)


If it solve the issue, please mark it as best answer.

Regards,

Priya Ranjan

This was selected as the best answer
Atul Shendge 2Atul Shendge 2
Hi Priya,

Thanks for answering this.

But the field Country is a picklist field and I am getting below syntax error:
 Field Country_c is a picklist field. Picklist fields are only supported in certain functions. Tell more
$User.Country  <> 'FRANCE'

Thanks in Advance,
Atul