You need to sign in to do that
Don't have an account?
Problem with Stopping Workflow rules using NOT ($User.UserRoleId= "00E20000000vkp7"),
I have multiple work flow rules that look at fields to see if they have changed. If they have changed and an ID number is greater than 0 then an email alert is triggered.
I want to stop these alerts happening if a person with a particular role in the organisation has changed the data.
This is the rule criteria, however even though it states NOT user role = certain role it still generates email trigger and therefore email alert.
I am pretty new to Salesforce and wondered if anyone new what I was doing wrong?
AND(
NOT ($User.UserRoleId= "00E20000000vkp7"),
LEN(Ulla_ID__c) > 0,
OR(
ISCHANGED(BDM__c )
))
thanks
TobyMc
I think you could use the following. You don't need the OR and can get rid of the "NOT" and use " <> " instead. I didn't test this, but the logic is: If the User Role is not equal to 00E20000000vkp7 AND Ulla_ID__c is not null AND the BDM__c has changed.
AND($User.UserRoleId <> "00E20000000vkp7",
LEN(Ulla_ID__c) > 0,ISCHANGED(BDM__c))
Hope this solves the problem. To help testing, you can turn on the debug logs for the user you are testing this with to see exactly how the validation rule is being evaluated.