Ask Search:
Julie GruberJulie Gruber 

Validation rule to prevent Account Creation by users with specific role

Hi,

I am trying to create a validation rule that would prevent our SDRs from creating accounts.
(I am able to use their user role and our custom user field: Role__c)

I tried the following and was unsuccesful:
CreatedBy.UserRoleId = "SDR"
ISPICKVAL( $User.Role__c, "SDR")

Thank you for the help!
Best Answer chosen by Julie Gruber
Steve MolisSteve Molis
Try this
AND(
ISNEW(),
$UserRole.Name = "SDR"
)

 

All Answers

Steve MolisSteve Molis
Try this
AND(
ISNEW(),
$UserRole.Name = "SDR"
)

 
This was selected as the best answer
Julie GruberJulie Gruber
Thank you for the fast reply Steve! It works like a charm :)
Steve MolisSteve Molis
No problem Julie, 

Can you do me a favor and mark your question as closed/resolved by clicking the Best Answer link on the solution.

Thanks,
SteveMo