How to restrict visibility of the 'closed' option in the 'state' field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2023 07:57 AM
Hi,
I've established a 'u_support_feedback' table containing a 'state' field, where one of the values is 'closed.'
I want to restrict visibility of the 'closed' option in the 'state' field to users without the 'mac_departmentTL' role.
This means only users with the 'mac_departmentTL' role should be able to close records.
How can I implement this?
Thanks,
Sahar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2023 08:22 AM
You can add the role condition in Closed UI Action like
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2023 08:45 AM
Hello @Sahar_Kaizer,
If you don't have any UI action to close that ticket, you can create a new UI action with restricting the UI action only for the specified user with role.
Additionally, if any other user tries to change the state to close, you can create onChange client script when the state changes to 'Close'. And you can check if the user don't have the required role to close the ticket, you can add a alert/error message indicating that user cannot change the state to 'Close' by setting the state to its previous value.
If my above solution resolve your issue, Please marked the solution as 'Accepted Solution' and also marked it as 'Helpful'.
Thank You.
Prathamesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2023 09:11 AM
Hi @Sahar_Kaizer ,
Write an Onload Client Script as follows to hide the State value "closed" provided if the logged in user don't have mac_departmentTL' role.
Regards,
Murali.
Please mark my answer as helpful and the solution accepted if it serves the purpose.
