1

I want to create a validation rule where only users with the role “UK: Institutional Team” are able to create cases with the record type called “Benchmark Change”.

My Validation rule is;

AND( 
ISNEW(), 
RecordTypeId = '01250000000UK5B', 
$UserRole.Name = 'UKInstitutionalTeam')

However I can create a case and I am system admin

Case
Record type name : Benchmark Change
Record type iD : '01250000000UK5B'

Role Hierarchy
Label: UK: Institutional Team
Role name: UKInstitutionalTeam

1

If you want only users with the “UK: Institutional Team” role to be able to create records with this record type, the last part of your validation rule should state

NOT($UserRole.Name = "UKInstitutionalTeam")

since it should fire when the logged in user does not have this role.

  • HI Robin I have just changed this logic, and i can still create the record type and i am system admin :( – user11500 Sep 10 '14 at 12:48
  • are you using the correct role name with correct spacing and cases ? – Vamsi Krishna Gosu Sep 10 '14 at 12:49
  • Yeah, i copied it directly from the user – user11500 Sep 10 '14 at 12:56
1

Should it be

IF( AND( ISNEW(), RecordTypeId = '01250000000UK5B'), NOT($UserRole.Name = 'UKInstitutionalTeam'), false)

0

Try this, AND(RecordTypeId = '01250000000UK5B', !($UserRole.Name = 'UKInstitutionalTeam'))

  • Thank you for your advice, however its still allowing me to create a case when i am system admin – user11500 Sep 10 '14 at 13:20
0

Please remember that the validation rule kicks in at the moment you save the new case, not immediately after you select the record type. It may be more efficient to set up a profile for these users and remove the record type from that specific profile, assuming that they do not need view/edit access to the cases with that case record type either.

If you do want to use the validation rule, then the following formula should work:

AND(
ISNEW(),
RecordTypeId = '01250000000UK5B',
NOT($UserRole.Name = 'UKInstitutionalTeam'))
  • Check to make sure that the RecordTypeId is correct. Copy and paste it from the URL when you are on the specific RecordType view. – Aaron Sep 12 '14 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.