The trick here is not to check if the record has changed was an admin or another user, simply check the user's profile and if is valid or not then through the expectation if it returns true then it shows an error message. if(user.profile == "Admin" , true,false)
If you find this helpful mark it as the Best Answer.
Can you post a specific example of what you are trying to do with the VR?
If you're just looking for infomation on the usage of an IF function there are some resources available here->
http://www.salesforce.com/customer-resources/learning-center/
Below is the sample code of Validation Rules using IF condition -
IF(MOD(TestNumber__c ,10) != 0, true, false)
It basically checks if TestNumber__c field is not in multiple of 10 i.e. it will be true for the values :
0, 10, 20, 30, 40, 50, 60, 70,80, 90, 100
I am also trying the same validation rule like above ..but it is not working for "Percent" field. Any work around on this??
Thanks in Advance
Hi anitha20,
find the below solution
The trick here is not to check if the record has changed was an admin or another user, simply check the user's profile and if is valid or not then through the expectation if it returns true then it shows an error message.
if(user.profile == "Admin" , true,false)
If you find this helpful mark it as the Best Answer.
I want create Account Number validate through validation rule.