+ Start a Discussion
anvesh@force.comanvesh@force.com 

Need validation rule for this ?

need for only users assigned to 2 certain roles can create ‘private’ Contacts (Contact records with no associated Account). 
Anupam RastogiAnupam Rastogi
Hi Anvesh,

Here is the Validation Rule Error Condition Formula that you can use. Just replace the exact Role Ids for the two roles which can create contacts without an Account.
 
IF(ISBLANK( AccountId ) &&  ($User.UserRoleId == [RoleId1] || $User.UserRoleId == [RoleId2]), False, True)

Thanks
AR

If you found the reply useful that helped resolve the problem, then please mark it as best answer.