How to restrict user to see only records assigned to him??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2018 02:39 AM
Hi,
I have created a custom task table named "Record". In the assigned to field I have provided the user name.
That task should be assigned to the user provided in the "assigned_to" field. It is working fine, but the user is also able to see the tasks which are assigned to other users.
I have given the "itil" role to the user and my table can be access if the user has that "itil" role.
But the concern is that the itil user can see all the tasks in the table instead of only tasks assigned to him/her.
Please suggest if there is any way to make the limit the tasks visible to "itil" user on the basis of tasks assigned to them.User should be able to see the tasks which are assigned to them and not the other tasks.
Please suggest, if I am doing anything wrong and how can we achieve this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2018 12:23 PM
hi,
you can configure ACL to show records which are assigned to logged in user.
Please check below sample code and modify as per your custom table name etc
Table: incident
Operation: read
Script:
anwer = checkUser();
function checkUser(){
if (gs.getUserID() == current.assigned_to){return true;}
return false;
}
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2018 10:27 PM
hey,
actually I have assigned an ITIL role for all my users who would be able to records in table. So being an ITIL user, he/she can see all records, and I want to restrict it to his/her records only.
Please suggest
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2018 11:04 PM
It worked !
Thank you so much..
Regards,
shivani

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-14-2018 09:38 AM
Hi Shivani,
Please mark my answer as correct so that others can benefit from similar question.
Regards,
Sachin