Incident submission issue

Snow214
Tera Contributor

I want to submit incident when dialogue box shows up and after clicking on OK from dialogue box it must continue submit. and it should work for New as well as existing incident records.

I have written onsubmit client script.

function onSubmit() {
    if (g_form.getValue('priority') == '1' && !g_scratchpad._action_confirmed) {
        var gm = new GlideModal("glide_confirm_standard");
        gm.setTitle("Confirmation");
        gm.setPreference("warning", true);
        gm.setPreference("title", "Do you want to continue?");
        gm.setPreference('onPromptComplete', function() {
            g_scratchpad._action_confirmed = true;
            g_form.submit();
        });
        gm.setPreference('onPromptCancel', function() {
        });
        gm.render();
        return false;
    }
    return true;
}

 currently the pop up shows, but after clicking on OK button the pop up destroys and again I need to click on save ui action on form to submit it. Can we submit it directly after clicking on OK.

 

Please let me know if anyone has worked on this. 

1 REPLY 1

Murthy Ch
Giga Sage

@Snow214 

I've answered similar question recently here. Have a look on this.

I believe it will help to resolve your issue.

 

Thanks,
Murthy