How to create a popup in incident table

Roshini
Giga Guru

Hi Team,

Can I know the end to end configuration for getting a popup window in incident form for below scenario
when incident is in "on hold" state and I click on a Ui action "In progress" then a popup needs to come,where it asks the user to type the "reason for making the incident back to in progress " and the input given by user will be moved to work notes with "Reason for state change is + "user_input" ".

1 ACCEPTED SOLUTION

JohnnySnow
Kilo Sage

@Roshini Can you please try below code and mark helpful/correct if it helped. It worked fine in my PDI.

Create a new UI Action as below

JohnnySnow_0-1729485800812.png

add below code to the script section

function showAlert() {
    var res = prompt("Please provide the reason for changing the state");
    if (res) {
        g_form.setValue('comments', "Reason for state change is " + res);
        g_form.setValue('state', '2');
        gsftSubmit(null, g_form.getFormElement(), "inprogress");
    }
}
if (typeof window == 'undefined')
    updateInc();

function updateInc() {
    current.update();
}
Thanks
Johnny

Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

3 REPLIES 3

JohnnySnow
Kilo Sage

@Roshini Can you please try below code and mark helpful/correct if it helped. It worked fine in my PDI.

Create a new UI Action as below

JohnnySnow_0-1729485800812.png

add below code to the script section

function showAlert() {
    var res = prompt("Please provide the reason for changing the state");
    if (res) {
        g_form.setValue('comments', "Reason for state change is " + res);
        g_form.setValue('state', '2');
        gsftSubmit(null, g_form.getFormElement(), "inprogress");
    }
}
if (typeof window == 'undefined')
    updateInc();

function updateInc() {
    current.update();
}
Thanks
Johnny

Please mark this response as correct or helpful if it assisted you with your question.

Thanks a lot that worked

But can I know how this can be done via UI page