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

End user should see the tasks which are assigned only to him

knowledgelearne
Kilo Contributor

Hello Community members,

I have a form which is used to create tasks and assign them to the particular user. Now as an end user, i should see the tasks which are assigned only to me. How can i perform that?

Thanks

1 ACCEPTED SOLUTION

ghsrikanth
Tera Guru

There are two ways you can do this - one is by Query Business rule route and another ACL route   -


In query BR -


1. Write a query BR for the incident, in the script current.addQuery('assigned_to',gs.getUserID());



Screen Shot 2016-03-17 at 9.23.09 AM.png



Screen Shot 2016-03-17 at 9.24.56 AM.png



The second option is ACL route -



Screen Shot 2016-03-17 at 9.22.09 AM.png



- Pros of using Query BR, when you have view the incidents in the list view, it looks clean but in case of ACL route, in the list view, there will be error message like "Security constraint preventing 40 records" and in the pagination it will display all the records.


This kind of misleads the end user.



- Pros of using Security ACL, when you do GlideRecord query in the script, ACLs are bypassed but Query BRs are not



Implement both and see whatever looks cleaner and better for you.



Mark if it is helpful or correct, feedback is appreciated


View solution in original post

9 REPLIES 9

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Komal,



You can refer the below ACL on incident table for reference and then create the same on your custom table as per your logic.


https://INSTANCENAME.service-now.com/sys_security_acl.do?sys_id=7da3bda1c0a801667dc88c1e9527f776&sys...



IN the above case "You can read an incident if you opened it, are the caller of record, or are on the watch list".


Hey Pradeep,



Thanks for the assistance but the given link is not working. Can you check on it?


Hi Komal,



On your instance check for read ACL's on incident table.


Hey Pradeep,



I tried to check the read ACL's on the incident table. But that didn't work. Can you help me?