Need User validation ( Yes or No ) before copying change Tasks when copying a change.

FidaP
Tera Contributor

My requirement is when user click on copy change UI action, system should display a confirm box on the screen first and if the answer is Yes, the change Tasks can be copied as usual, but if the answer is No, then system need to exclude the change Tasks table and copy other tables mentioned in system property 'com.snc.change_request.copy.related_lists' and then copy the change. 

 

I know the Copy change UI action is calling script includes 'ChangeUtils' & 'ChangeUtilsSNC'. Can some body please suggest how can i make changes in the code to exclude change_task table only when the answer is No from the confirmation dialogue box ? 

 

Please also suggest how the confirmation dialogue box can be popped up when clicked on Copy change. 

1 ACCEPTED SOLUTION

Hi @FidaP 

 

I am not a developer, but I had similar issue in one my account. What we did, we created a new UI Action and named with Copy change without Task and rename the original one with Copy Change With Task.  and for the newly created UI action , we can remove the copy task. 

 

Again, I dont have much idea about code now but it was the only solution worked for us.

 

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

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

View solution in original post

6 REPLIES 6

Thanks @Dr Atul G- LNG 

 

I have tried your solution and created a new UI action, although it required a lot of work to do when the UI action calls the UI page, but it worked finally with some code modifications. Thank you

Hi @FidaP 

 

That is awesome news, I know it is tough but I recommend please have a good round of testing before move to prod./ UAT.

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

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