The CreatorCon Call for Content is officially open! Get started here.

How to restrict access to incident records based on a choice list

Community Alums
Not applicable

Hi SN Devs,

 

I'm trying to limit who can view a subset of incidents based on a specific value being selected from a choice list field on an incident record.

 

We have a helper table that aligns which role is needed depending on which restriction type is entered. E.g.

 

Type | Role

Restriction Type 1 | Role1

Restriction Type 2 | Role2

Restriction Type 3 | Role3

 

What script would you call to find if the logged in user has a role that matches the present restriction type?

 

Thank you in advance!

3 REPLIES 3

Jyoti Jadhav9
Tera Guru

Hi TEBB,

You can try the "Before Query" business rule on the incident table to achieve this functionality.

Please mark reply as Helpful/Correct/Accept Solution, if applicable. Thanks!

 

Thanks & Regards

Jyoti Jadhav

 

Abhay Kumar1
Giga Sage

@Community Alums you can have a read only ACL to restrict read data as per role.

ACL on table.*  and use advance to write script for making true as per user has role.

Hope this will help.

Community Alums
Not applicable

It's the script that is proving difficult, on the incident record, the "type" is being selected from a choice list.

The role required  to see a given type is being matched to a given type on the helper table.

We're hearing that doing a glide record to look up the type from the incident record is against best practice. That's where the struggle is. Any thoughts?