You need to sign in to do that
Don't have an account?
Paula Jarvis 4
Account Validation not working as composed
I have an Account Validation Rule that locks down a field on the Account. I did not enconter any Syntax errors so Ithought I as good to go until I started testing with a Profile not listed. Only the two Profiles listed should be able to enter AND edit the field referenced in the Rule. Any thoughts how to correct?
AND(
$Profile.Name = "Custom Billing Administrator",
$Profile.Name = "System Administrator",
ISCHANGED( RecurSoft__Billing_Contact__c )
)
AND(
$Profile.Name = "Custom Billing Administrator",
$Profile.Name = "System Administrator",
ISCHANGED( RecurSoft__Billing_Contact__c )
)
- Is the user a Custom Billing Administrator? True or false.
- Is the user a System Administrator? True or False.
- Has the RecurSoft__Billing_Contact__c been changed? True or false.
If the answer is true for those three questions, the rule fires, but it will never fire because it's impossible for a user to have two profiles.A slight tweak will fix the problem. Change the formula to this:
AND(
!OR(
$Profile.Name = "Custom Billing Administrator",
$Profile.Name = "System Administrator"),
ISCHANGED( RecurSoft__Billing_Contact__c )
)
Now it asks two questions:
- Does the user have a profile other than Custom Billing Administrator or a System Administrator? True or False.
- Has the RecurSoft__Billing_Contact__c been changed? True or false.
Take good note of the exclamation point, it works like the function NOT(). Because that is there, instead of firing when the user is one of the two profiles, It fires when it is not one of the two profiles. This should work as desired.All Answers
- Is the user a Custom Billing Administrator? True or false.
- Is the user a System Administrator? True or False.
- Has the RecurSoft__Billing_Contact__c been changed? True or false.
If the answer is true for those three questions, the rule fires, but it will never fire because it's impossible for a user to have two profiles.A slight tweak will fix the problem. Change the formula to this:
AND(
!OR(
$Profile.Name = "Custom Billing Administrator",
$Profile.Name = "System Administrator"),
ISCHANGED( RecurSoft__Billing_Contact__c )
)
Now it asks two questions:
- Does the user have a profile other than Custom Billing Administrator or a System Administrator? True or False.
- Has the RecurSoft__Billing_Contact__c been changed? True or false.
Take good note of the exclamation point, it works like the function NOT(). Because that is there, instead of firing when the user is one of the two profiles, It fires when it is not one of the two profiles. This should work as desired.