Customize New Tab Behavior Now Experience Workspace

Mark Endsley
Tera Guru

Hi Everyone!

I'm creating a Now Experience Workspace for my custom app. When the user clicks the (+)

find_real_file.png

To customize this as far as I have I've edited the chrome_tab record in the sys_ux_page_property table where I found this nice little JSON file.

 

{
    "contextual":[
       "record"
    ],
    "newTabMenu":[
       {
          "label":{
             "translatable":true,
             "message":"New Request"
          },
          "routeInfo":{
             "route":"record",
             "fields":{
                "table":"x_g_jhu_transport_request",
                "sysId":"-1"
             },
             "multiInstField":"sysId"
          },
          "condition":{
             "tableDescription":{
                "table":"x_g_jhu_transport_request",
                "canCreate":true
             }
          }
       }
       
    ],
    "maxMainTabLimit":10,
    "maxTotalSubTabLimit":30
 }

 

I've been able to modify the routeInfo and condition objects to get it to open a record for my custom app instead of incidents and interactions. However what I truly want to do is open a record producer in the service portal. I know this can be done, because in the main Agent Workspace I've been able to have an interaction redirect users to the Service Portal via client script within the Workspace.

Are there any valid inputs to this JSON to achieve this? What are the valid inputs? Is this really how ServiceNow intends me to do this? Or am I missing something?

1 ACCEPTED SOLUTION

The route should just be the name of your page, which I'm guessing is something like 'home' based on your screenshot. You can replace the record route in your original JSON with the route of your new page and clear out the fields property unless you're passing parameters to the page. It would be something like:

{
    "contextual":[
       "record"
    ],
    "newTabMenu":[
       {
          "label":{
             "translatable":true,
             "message":"New Request"
          },
          "routeInfo":{
             "route":"home",
             "fields":{},
             "multiInstField":"sysId"
          },
          "condition":{
             "tableDescription":{
                "table":"x_g_jhu_transport_request",
                "canCreate":true
             }
          }
       }
       
    ],
    "maxMainTabLimit":10,
    "maxTotalSubTabLimit":30
 }

If this format doesn't work you might try removing the fields and multiInstField properties entirely.

View solution in original post

8 REPLIES 8

Hi Brad.

Could you please help me with the code for me.

I need to open form of one of the catalog item if i click on +.

Click on + then we should have option 'Create Catalog'  option alone with 'Create HR case' and 'Create Interaction' for my HR agent Workspace.

Please suggest. Thank you very much in advance.

Aarav.

 

Hi Brad,

 

Is there a way to add an URL in routeInfo, I am trying to create a "Major incident" here, which again doesn't allow me. Any thoughts?

kumarg437
Mega Expert

Hi @Mark Endsley 

I have created a new option to create service request. It is routing to OOTB 'Service Catalog' by default.

kumarg437_0-1746789873232.png

 

 

I am trying to route to my Custom catalog, but it is not happening whatever I tried, it is always going to OOTB Service catalog only.

 

If any of you have any ideas about this. Please feel free to pitch in!

Jordan Rhude
Tera Contributor

Hello all , I am working on a similar request for this, but trying to get it to go to my standard catalog so that the users can use the default catalog to pick an item and put in a request for users. The code snip-it below is what i have added and i have tried a lot of different variables for this. looking for some help with this. I am trying to direct it to this URL dynamically so it will work without the URL being hard coded.
 URL: https://your_instance_name_here/now/nav/ui/classic/params/target/catalog_home.do%3Fsysparm_view%3Dcatalog_default



    {
      "label": {
        "translatable": true,
        "message": "New Catalog Item"
      },
      "routeInfo": {
        "route": "catalog_home"
      },
      "condition": {
        "tableDescription": {
          "canCreate": true
        }
      }
    },
    {