Error while calling custom UI Page in Major Incident Management

linda_richards
Giga Expert

Hello Community,

 

My requirement is to customize the Major Incident Management UI page that appears after clicking the 'View Workbench' UI action within a major incident record. I am attempting to call my custom UI page by overriding the Out-of-the-Box 'View Workbench' UI action, but I am encountering the following error. 

Your help is much appreciated.

 

linda_richards_0-1751979362439.png

 

Thanks,

Linda

 

1 ACCEPTED SOLUTION

Removing $ sign from below syntax has fixed the issue. $ symbol is reserved for OOTB system UI pages, hence it should not be used for custom UI pages. var url = "/$<ui_page_endpoint>.do?sysparm_stack=no&sysparm_sys_id=" + g_form.getUniqueValue();

 

Thanks,

Linda

View solution in original post

10 REPLIES 10

Ankur Bawiskar
Tera Patron
Tera Patron

@linda_richards 

it must be in scoped app

Are you updating the newly created UI page in the OOTB ui action?

share screenshots.

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

As I've mentioned in the original post that I've overriden the OOTB UI Action.I can see my UI action have successfully overriden the OOTB version as I can see custom validation message is getting displayed on the screen. Both UI action and UI page are under application scope of Major incident management. In OOTB UI action I am just giving reference to my custom UI Page like this 

 

 

function openMIMWorkbench() {
    alert('Success');
    var url = "/$custom_workbench.do?sysparm_stack=no&sysparm_sys_id=" + g_form.getUniqueValue();
   
   
    var isPolarisEnabled = isPolaris();
    if (isPolarisEnabled) {
        var polarisPrefixUrl = "/now/nav/ui/classic/params/target/";
        var query = "/$custom_workbench.do?sysparm_stack=no&sysparm_full_theme_support=true&sysparm_use_polaris=true&sysparm_sys_id=" + g_form.getUniqueValue();
        query = encodeURIComponent(query);
        url = polarisPrefixUrl + query;
    }
   
    var gsftFrame = parent.document.getElementById('gsft_main');
    if(!gsftFrame)
            gsftFrame = parent.document.getElementById('testFrame');
    if (gsftFrame) {
        var gsftWindow = gsftFrame.contentWindow || gsftFrame.contentDocument;
        gsftWindow.location = url;
    }
    else {
        parent.location = url;
    }
}

@linda_richards 

share screenshot of your newly created UI page

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

Thank you @Ankur Bawiskar  for the response. Here's screenshot of the UI Page. Let me know if you are even looking for it's code.

 

 

linda_richards_0-1752048503979.png

 

Thank you,

Linda