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

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @FidaP 

 

check the change properties

 

AGLearnNGrow_0-1717158395500.png

 

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

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

SK Chand Basha
Giga Sage

Hi @FidaP 

 

Can you try with the On submit Client script 

 

Mark it Helpful and accept solution!! If this helps you to understand. 

FidaP
Tera Contributor

Hi AG,

 

I am planning to build a confirm box when user clicks on Copy change, if the answer is OK, the functionality should work as it is, but if the answer is cancel then, all the change Tasks of the original change if any, should not be carried over to copied change request. How can i achieve it in the code ?

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]

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