Risk Assessment UI action in servicenow SOW

Pooja P
Tera Contributor

Hi Team,

 

We want to add Risk Assessment UI action to SOW . we are able to achieve it but after first submission we are calling UI page which will ask already submitted Yes or No if Yes is selected then it will re-show the submitted answer if No is selected then reload the form . this is happening on native view but not supported on SOW kindly suggest if anyone achieved this.

 

Thanks,

Pooja

1 ACCEPTED SOLUTION

@Pooja P 

you might have to customize it heavily or create your own UI page which handles this logic.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

9 REPLIES 9

@Pooja P 

that UI page if called from g_modal.showFrame() isn't working?

is it not getting rendered?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Yes @Ankur Bawiskar  its not working.

 

From below code we are not getting response value .

 

function handleCompletedAsmt(g_form) {

    g_modal.showFrame({

        url: "change_risk_completed_asmt_dialog.do",

        title: "Risk Assessment Complete",

        size: "md",

        preferences: {

            displayValue: g_form.getDisplayValue(),

            focusTrap: true

        },

        onClose: function(response) {

            if (response === "yes") {

                // Allow user to resubmit the form

                g_form.setValue('state', 'new'); // or appropriate state

                g_form.save(); // or g_form.submit()

            } else {

                g_form.addInfoMessage("Risk assessment remains unchanged.");

            }

        }

 

Kindly suggest. we are getting UI page on form when we click on Risk Assessment but Yes or No input is not coming up, 

@Pooja P 

what's not working?

It's rendering but showing the content?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Pooja P
Tera Contributor

Hi @Ankur Bawiskar , In function handleCompletedAsmt, we are calling UI page change_risk_completed_asmt_dialog. IF risk assessment is already submitted,  Yes or No popup will be shown. if Yes is selected then it will re-show the submitted answer if No is selected then reload the form. Popup is showing, but when we click on YES or NO, on click is not working because In UI page we are using GlideDialogWindow. please check screenshot for reference.

@Pooja P 

you might have to customize it heavily or create your own UI page which handles this logic.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader