Change Request record should be closed only by Change co-ordinator, Assigned to person and Opened by

Rooma1
Tera Contributor

Hi All,

 

Hi All,

 

I have a requirement to hide the 'Close Change' UI Action for the users (ITIL users from other group and Non ITIL users).

A Change Request should only be closed by the change co-ordinator and the Assigned to person who is having that CR.

Can someone please help me how to achieve this requirement?

Following are the only users allowed to close a change requests

 

1. members of the assignment group the change is assigned to
2. users with the change coordinator role

3. Opened By users

 

I have achieved the fist and second scenario, how to do for the third?

 

current.state==3 && (gs.hasRole('change_coordinator')||(!current.assignment_group.nil()&& gs.getUser().isMemberOf(current.assignment_group.toString())))&& (new StateFlow().validFlow(current, 'eeb4725b6f7b61002e6b1dfbbb3ee449', 'manual'));

 

Thanks

1 ACCEPTED SOLUTION

Unique45
Mega Sage

Hello @Rooma1,

To add third condition you need to add following code : 

(current.opened_by == gs.getUserID())

 

Please mark correct/helpful if this helps you!

View solution in original post

3 REPLIES 3

Harish KM
Kilo Patron
Kilo Patron

Hi @Rooma1 you can place your 3rd condition like below

current.opened_by==gs.getUserID() // opened by user matches loggedin user then show button

Regards
Harish

Unique45
Mega Sage

Hello @Rooma1,

To add third condition you need to add following code : 

(current.opened_by == gs.getUserID())

 

Please mark correct/helpful if this helps you!

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Rooma1 

 


users with the change coordinator role

Atul: Did you create a custom role for thsi?

*************************************************************************************************************
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]

****************************************************************************************************************