The Zurich release has arrived! Interested in new features and functionalities? Click here for more

How to lock down Change Task so the user (non-change_manager or non-admin user) cannot move task

crisdaniel
Tera Contributor

How to lock down Change Task so the user (non-change_manager or non-admin user) cannot move task from the Open state back down to the Pending state? We have users moving their CTASKs back to Pending state while the Change is in Implement state. We need the CTASK to remain in Open state until the user has completed their testing and they should then close their CTASK.  I was hoping for something out of the box, but I'm not seeing anything. 

1 ACCEPTED SOLUTION

DrewW
Mega Sage
Mega Sage

Easiest way is to use an onLoad client script to check to see if the user does not have the roles you specified and then if the change task is NOT currently in the Pending state remove Pending from the choice selections by using the g_form.removeOption.

 

https://developer.servicenow.com/dev.do#!/reference/api/utah/client/c_GlideFormAPI#r_GlideFormRemove...

 

Then you should probably add a business rule to abort any update that changes the state to Pending when the users does not have the roles.

 

View solution in original post

2 REPLIES 2

DrewW
Mega Sage
Mega Sage

Easiest way is to use an onLoad client script to check to see if the user does not have the roles you specified and then if the change task is NOT currently in the Pending state remove Pending from the choice selections by using the g_form.removeOption.

 

https://developer.servicenow.com/dev.do#!/reference/api/utah/client/c_GlideFormAPI#r_GlideFormRemove...

 

Then you should probably add a business rule to abort any update that changes the state to Pending when the users does not have the roles.

 

crisdaniel
Tera Contributor

Thank you Drew! That worked!