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.

Add 'Create Request' Option in Service Operation Workspace

Alon Grod
Tera Expert

How can I adjust this code and add an option 'Create Request', when the user will choose this option he will be redirect to the instance url (should be dynamic) + esc?id=sc_category, for example: https://servicenow/esc?id=sc_category

The user should have two options: 'Create Incident' (working fine) and 'Create Request').

Screenshot 2023-07-16 at 22.34.45.png

 

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

Samaksh Wani
Giga Sage

Hello @Alon Grod 

 

 

 

{
  "contextual": [
    "record",
    "kb_view"
  ],
  "newTabMenu": [
    {
      "label": {
        "translatable": true,
        "message": "New Incident"
      },
"type":"navigation",
"position":200,
"primaryDisplay":"none",
"value":{
"type":"external",
"opensWindow":"true",
"value": {
"href": "/esc?id=sc_category"
}
},
      "routeInfo": {
        "route": "record",
        "fields": {
          "table": "incident",
          "sysId": "-1"
        },
        "multiInstField": "sysId"
      },
      "condition": {
        "tableDescription": {
          "table": "incident",
          "canCreate": true
        }
      }
    }
  ],
  "maxMainTabLimit": 10,
  "maxTotalSubTabLimit": 30
}

 

 

 

Plz Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.

 

Regards,

Samaksh

 

@Samaksh Wani  its not working

Cau Thoong
Tera Contributor

Try adding this? This takes me directly to the service catalog page in SOW.

{
"label": {
"translatable": true,
"message": "New Request"
},
"routeInfo": {
"route": "record",
"fields": {
"table": "sc_cat_item",
"sysId": "-1"
},
"multiInstField": "sysId"
},
"condition": {
"tableDescription": {
"table": "sc_cat_item",
"canCreate": true
}
}
},