New tab customization in agent workspace (chrome_tab)

Kiruthika J
Tera Contributor

Hi All,

I have two different set of audience for service operation workspace if audience abc logged in to the instance he should see only new interaction tab and if xyz audience logs in then they should see only new change and new incident not new interaction.

KiruthikaJ_0-1746184232343.png

 



I have wrote this in chrome tab value 
{
"contextual": [
"record",
"kb_view"
],
"newTabMenu": [
{
"label": {
"translatable": true,
"message": "New Incident"
},
"routeInfo": {
"route": "record",
"fields": {
"table": "incident",
"sysId": "-1"
},
"multiInstField": "sysId"
},
"condition": {
"script": "var groups = ['one Help desk', 'one help desk - quality check', 'one help desk - specialist', 'one help desk - sap', 'one help desk - teamleads']; for (var i = 0; i < groups.length; i++) { if (GlideUser.isMemberOf(groups[i])) return false; } return true;"
}
},
{
"label": {
"translatable": true,
"message": "New Change Request"
},
"routeInfo": {
"route": "create-change-request-page",
"fields": {},
"multiInstField": ""
},
"condition": {
"script": "var groups = ['one Help desk', 'one help desk - quality check', 'one help desk - specialist', 'one help desk - sap', 'one help desk - teamleads']; for (var i = 0; i < groups.length; i++) { if (GlideUser.isMemberOf(groups[i])) return false; } return true;"
}
},
{
"label": {
"translatable": true,
"message": "New Interaction"
},
"routeInfo": {
"route": "record",
"fields": {
"table": "interaction",
"sysId": "-1"
},
"multiInstField": "sysId"
},
"condition": {
"script": "var groups = ['one Help desk', 'one help desk - quality check', 'one help desk - specialist', 'one help desk - sap', 'one help desk - teamleads']; for (var i = 0; i < groups.length; i++) { if (GlideUser.isMemberOf(groups[i])) return true; } return false;"
}
}
],
"maxMainTabLimit": 10,
"maxTotalSubTabLimit": 30
}

in above script when I used applies to :["audience sys id"] it didn't  work so I tried with group.

9 REPLIES 9

Ankur Bawiskar
Tera Patron
Tera Patron

@Kiruthika J 

Does script work there?

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

Ankur Bawiskar
Tera Patron
Tera Patron

@Kiruthika J 

you can either show/hide them completely and not based on condition

Workaround: you can use table level CREATE ACL and block it by using advanced script in the ACL of interaction table itself and if user doesn't satisfy the role then it's gone.

Hide New Interaction Button on Workspace based on Conditions - Service Operations Workspace 

How to hide 'New Interaction'? 

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

Completely hide using acl and in advanced condition I can mention if logged in user not part of particular group then they can see new change and new incident tab?
can you please let me know how to configure the acl for the same?

not based on role, based on group or audience I want the tab button to hide/ show. can you please assist?