How to disable an ootb UI Page ?

ads
Tera Expert

Hi All,

How can I disable an ootb UI page ?

UI Page -mim_workbench_promote 

 

Thanks 

18 REPLIES 18

Hi,

I want to remove the UI page for all users with no conditions like inactive.

Hi,

then in UI action code comment the code which calls that UI page

It must be GlideModal or GlideDialogWindow

Regards
Ankur

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

Hi Ankur,

Is the highlated line need to be comented ?

function promptForPromoteMIC() {
    if (!g_form.getControl('work_notes')) {
        getMessage('Cannot promote major incident candidate as "Worknotes" is not visible', function(msg) {
            g_form.addErrorMessage(msg);
        });
        return false;
    }

    var dialog = new GlideModal('sn_major_inc_mgmt_mim_workbench_promote', false, 848, 350);
    getMessage('Promote to Major Incident', function(msg) {
        dialog.setTitle(msg);
    });
    ScriptLoader.getScripts('/scripts/incident/glide_modal_accessibility.js', function() {
        dialog.template = glideModalTemplate;
        dialog.on('bodyrendered', function(event) {
            glideModalKeyDownHandler(event, dialog.getID());
        });
        dialog.setPreference('WORK_NOTES', g_form.getValue('work_notes'));
        dialog.setPreference('BUSINESS_IMPACT', g_form.getValue('business_impact'));
        dialog.setPreference("focusTrap", true);
        dialog.render();
    });
}

if (typeof window == 'undefined')
    promoteMIC();

function promoteMIC() {
    var mim = new sn_major_inc_mgmt.MajorIncidentTriggerRules(current);
    mim.approveMIC();
    action.setRedirectURL(current);
}

Hi,

I don't get the requirement.

If you don't wish to promote incident as Major incident then why to show that UI action

What's the point in showing UI action when you wish nothing should happen on click of that?

yes comment this line

var dialog = new GlideModal('sn_major_inc_mgmt_mim_workbench_promote', false, 848, 350);

Regards
Ankur

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