ITSM - Change Management (Approval Confirmation/Atestation Message Box)

VS_09
Tera Contributor

For Normal and Emergency changes.

When a change approver goes to approve a change that is in Assess state, upon clicking the button to Approve. I would like a message box to appear with 2 buttons "Approve" and "Continue to Review".

1. If they click "Approve" the change moves to Authorize state.

2. If they click "Continue to Review" the approval process is stopped and change remains in Assess state untouched and Pending Approval remain untouched.

Question - Could this be possibly be controlled with a Tour Message Box?

 

There is change in requirement - We want OOB message box to be displayed when user click on Approve/Reject in the Approver Related list to approve the change request. Once they click on OK, change request move to Authorize state and when they cancel it, no change in the change request.
Could you help me in this?

6 REPLIES 6

Shaqeel
Mega Sage

Hi @VS_09 

 

No, this cannot be controlled with a Tour Message Box. The Tour Message Box in ServiceNow is used for creating guided tours for users to navigate through the system, not for controlling the workflow of a record. However, you can achieve this functionality using a UI Action with a client script

 

Mark Helpful/Solution 🙂

 

Regards

Shaqeel


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

Shaqeel

VS_09
Tera Contributor

Hi @Shaqeel 

 

Can you please provide script and steps to achieve this requirement?

 

Thanks,

Gurdit

Hi @VS_09 

 

Sure try it out.

 

1. Create a UI Action on the Change Request table.
2. Set the UI Action to be visible on the form and to execute on the server.
3. In the script, check if the current state is "Assess" and the user is an approver.
4. If the conditions are met, display a confirmation box with two options: "Approve" and "Continue to Review".
5. If the user clicks "Approve", change the state to "Authorize" and update the record.
6. If the user clicks "Continue to Review", do not make any changes and return to the form.

Here is a sample code:

javascript
if (current.state == 'assess' && gs.hasRole('approver')) {
var choice = gs.confirm('Do you want to Approve or Continue to Review?');
if (choice) {
current.state = 'authorize';
current.update();
gs.addInfoMessage('Change Request has been authorized.');
} else {
gs.addInfoMessage('Continuing to review the Change Request.');
}
}

 

I am not sure if this will work or not.

 

Mark Helpful/Solution 🙂

 

Regards

Shaqeel


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

Shaqeel

VS_09
Tera Contributor

@Shaqeel 

 

There is change in requirement - We want OOB message box to be displayed when user click on Approve/Reject in the Approver Related list to approve the change request. Once they click on OK, change request move to Authorize state and when they cancel it, no change in the change request.
Could you help me in this?