You need to sign in to do that
Don't have an account?

Validation: Profile Name
I am trying to exclude profiles from validations.
When I exclude System Administrator it works
Start_Date__c >= Vendor_Location__r.Cancellation_Date__c&& $Profile.Name <> "System Administrator"
But when I add on Accounts Receivabled it doesn't work even though I spelled it the same and copied and pasted it
Start_Date__c >= Vendor_Location__r.Cancellation_Date__c&& $Profile.Name <> "Accounts Receivable"
What am I missing here!
Thank you in advance
Change the || linking the two statements to be && and it should work. Also you could probably clean up that formula to be all on one line using parenthesis.
What your formula is stating is:
1.) Blahblahblah AND Profile can't be System Administrator
OR
2.) Blahblahblah AND Profile can't be Accounts Receivable
Therefore, if the profile is Sys Admin, the first statement is false, but the second statement is true, so the formula still evaluates to true, causing the error message to appear.
All Answers
Actually I just realised it is when I put the whole code together it doesn't work
Start_Date__c >= Vendor_Location__r.Cancellation_Date__c&& $Profile.Name <> "System Administrator"||
Start_Date__c >= Vendor_Location__r.Cancellation_Date__c&& $Profile.Name <> "Accounts Receivable"
Change the || linking the two statements to be && and it should work. Also you could probably clean up that formula to be all on one line using parenthesis.
What your formula is stating is:
1.) Blahblahblah AND Profile can't be System Administrator
OR
2.) Blahblahblah AND Profile can't be Accounts Receivable
Therefore, if the profile is Sys Admin, the first statement is false, but the second statement is true, so the formula still evaluates to true, causing the error message to appear.
yes, good ol' descrite mathematics!
Thanks!