Create popup dialog box when user click problem_task Re-Assess UI action

Arun33
Tera Expert

Hi Everyone,

 

I have "Re-Assess" UI action that I need to display a pop-up for with a comment box. They need to write the reason for the Re-Assess.

After they click ok, the reason comment should populates in worknote. 

I have create UI Page for this.

Arun33_0-1667662537721.png

and Re-Assess UI Action

Arun33_1-1667662610749.png

but it's not working can someone help me on this

2 ACCEPTED SOLUTIONS

Hi Anubhav,

 

UI Page

Arun33_0-1667888487752.png

 

UI Action

Arun33_1-1667888563384.png

 

Now the issue is am not able to add Re-Assess Reason in WorkNote when problem task is in close state.

Arun33_2-1667888706643.png

 

View solution in original post

Hi Anubhav,

 

I have checked with this as well but able to add worknote at close state.

 

Arun33_0-1667889601220.png

 

View solution in original post

9 REPLIES 9

AnubhavRitolia
Mega Sage
Mega Sage

Hi @Arun33 

 

As your requirement is simple and just need 1 input on pop - up dialog box, you can simply use 'prompt()' function on your client side UI Action script.

 

Please refer sample code to show how prompt() function works:

 

var prmpt= prompt("Please povide reason for re-assess."); // You can put your pop up message.
g_form.setValue('work_notes', prmpt);

 

Can refer below link for further details about prompt() function.

 

https://servicenowguru.com/scripting/client-scripts-scripting/javascript-popup-boxes-servicenow/

 

 

Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.

Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023

Hi Anubhav,

 

Issue is if problem task is in close state i am not able to add work note though pop-up dialog box.

Hi @Arun33 

 

Can you share your updated configuration for the same.

 

 

Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.

Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023

Hi Anubhav,

 

UI Page

Arun33_0-1667888487752.png

 

UI Action

Arun33_1-1667888563384.png

 

Now the issue is am not able to add Re-Assess Reason in WorkNote when problem task is in close state.

Arun33_2-1667888706643.png