We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

How can we add the restirction in list view without using any server side script or ACL's

SohamTipnis
Kilo Sage

Hey Community,

 

I have a requirement where I want to restrict the list view according to the role. Let's consider there are 2 roles, role AB and role XY, so without using the ACLs and any other server-side script, I want this to be achieved.

 

Do let me know if there is any other way to do this.

1 ACCEPTED SOLUTION

SohamTipnis
Kilo Sage

I came to the conclusion that this is not possible, as we cannot use the EncodedQuery() in the view rule; for that reason, this is not possible. Although I did some scripting on this, which made the user able to see specific records, which is half of the requirement.

This is what is did in the view rule script.

SohamTipnis_0-1770984315625.png

 

For incident replica

SohamTipnis_1-1770984372069.png

 

Thanks for the answers those who shared there thoughts on this; it gave me a good knowledge😊

View solution in original post

8 REPLIES 8

@SohamTipnis 

not possible.

Those 2 things are main pointers which blocks the records

You need to use either 2 Table.None READ ACLs or 1 Query BR or use combination of Table.None + Query BR 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

@SohamTipnis 

I already informed it's not possible without Query BR or ACL

You can mark multiple responses as correct.

💡 If my response helped, please mark it as correct as well so that this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

@SohamTipnis 

Any update to the above comment?

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

SohamTipnis
Kilo Sage

I came to the conclusion that this is not possible, as we cannot use the EncodedQuery() in the view rule; for that reason, this is not possible. Although I did some scripting on this, which made the user able to see specific records, which is half of the requirement.

This is what is did in the view rule script.

SohamTipnis_0-1770984315625.png

 

For incident replica

SohamTipnis_1-1770984372069.png

 

Thanks for the answers those who shared there thoughts on this; it gave me a good knowledge😊