Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Update Propose Major Incident UI Action

Seshu4
Tera Contributor

I would like to add two more inputs from dialog and post the data to incident. Could you please help me on this.

 

I have made some changes, but unable to post the data for new variables.

 

function propose() {
            if (!proposeBtn.hasClassName('disabled')) {
                var msg = getMessage("Proposed as major incident candidate");

                var notes = workNotes.value.trim();
                var bi = businessImpact.value.trim();
                var bic = businessImpactCause.value.trim();
                var biurgency = impactUrgency.value.trim();
                var biet = eventType.value.trim();
                var biudesc = businessImpactUserDesc.value.trim();
                //notes = notes + '' + bic;
                //alert(businessImpact.value && businessImpact.value != currentBusinessImpact);
                if (!config.workspace) {
                    g_form.getControl('work_notes').value = msg + "\n" + notes;
                    if (bic)
                        g_form.setValue('u_business_impact_users_not_able_to_do', "TEST3");
                    if (biurgency)
                        g_form.setValue('u_urgency_when_will_the_impact_be_fully_realized', biurgency);
                    if (biet)
                        g_form.setValue('u_event_type', biet);
                    if (biudesc)
                        g_form.setValue('u_user_description_describe_which_users', biudesc);
                    if (businessImpact.value && businessImpact.value != currentBusinessImpact)
                        g_form.setValue('business_impact', bi);

                    //g_form.setValue('u_business_impact_users_not_able_to_do', "TEST3");
                    close();
                    gsftSubmit(null, g_form.getFormElement(), 'sysverb_mim_propose');
                } else {
                    iframeMsgHelper.confirm({
                        msg: msg,
                        workNotes: notes,
                        businessImpact: bi
                    });
                }
            }
        }
0 REPLIES 0