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.

FIX UI Action UI Model Popup sometime it's not opening properly

fayazshaik
Tera Contributor

Sometimes it's opening like this:

fayazshaik_0-1712046460929.png

I want like this always:

fayazshaik_1-1712046628433.png

Ui action script:

 

function onFix() {
    if (g_form && g_form.mandatoryCheck()) {
        ScriptLoader.getScripts("ProblemModalUIHelpers.jsdbx", function() {
            ProblemModalUIHelpers.onFix();
        });
    }
}
 

Ui page function script:

 

ProblemModalUIHelpers.onFix = function() {
var view = g_form.getViewName();
if (!g_form.hasField("state")) {
getMessage('Cannot proceed to fix the Problem as \'State\' is not visible', function(msg) {
g_form.addErrorMessage(msg);
});
return false;
}
 
g_form.setValue("state", g_scratchpad.STATE.FIX_IN_PROGRESS);
if (g_form.mandatoryCheck()) {
g_form.save();
return;
}
 
g_form.clearMessages();
var sysId = g_form.getUniqueValue();
var ob = new ProblemModalUIHelpers();
 
var formValues = {
state: g_scratchpad.STATE.FIX_IN_PROGRESS
};
ob.openModal('start_fix_dialog_form_view', getMessage('Fix'), 850, formValues, "move_to_fix_in_progress");
};

 

 

0 REPLIES 0