Hide 'Agent Assist' on a new Record in Configurable Workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2024 11:24 AM
Hello - We rcently migrated from 'Agent Workspace" to "Configurable Workspace" and have started using 'CSM/FSM Workspace". We have a requirment to hide 'Agent Assist' icon (contextual side panel) on a new Record in CW. In the past while using Agent Workspace, there is a setting in "Agent Assist" ('sys_declarative_action_assignment' table) conditions tab to hide the icon on new record, but the same setting is not working on CW.
Setting in Agent Workspace:
Configurable Workpace vs Agent Workspace
Is there a setting/configuration to hide the Agent Assist on CW? TIA
Thanks,
Nitin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2024 09:37 PM - edited 05-05-2024 09:39 PM
HI @Nitin_NOW
(function canShowAA(params) {
var table = gs.nil(params.table) ? '' : params.table;
if (table == '') {
return false;
}
var sysId = gs.nil(params.sysId) ? '' : params.sysId;
if (sysId == '-1') { // new case
return true;
}
var caseRecord = new GlideRecord(table);
var isNewRecord = params.data.sysId == -1;
if (isNewRecord && caseRecord.get(sysId) && caseRecord.active == true)
return true;
return false;
})(inputProperties);
Regards,
Sid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2024 09:46 PM
Thanks @Sid_Takali I tried your code but the icon is still visible on the new Record. I even tried changing the below
if (isNewRecord && caseRecord.get(sysId) && caseRecord.active == true)
to
if (!isNewRecord && caseRecord.get(sysId) && caseRecord.active == true)
but no luck. Am I missing anything?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2024 11:05 PM
Change the following
if (sysId == '-1') { // new case
return true;
}
to:
if (sysId == '-1') { // new case
return false;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2024 06:23 AM
Hi @James Chun thank you. I tried your change and its weird that it did not work. I even tried to test incognito mode and also cleared the instance cache. No luck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2024 07:57 AM
@Nitin_NOW Can you try the below script,
(function canShowAA(params) {
var table = gs.nil(params.table) ? '' : params.table;
if (table == '') {
return false;
}
var sysId = gs.nil(params.sysId) ? '' : params.sysId;
if (sysId == '-1') { // new case
return false;
}
else if(sysId != '-1'){ //existing case
return true;
}
var caseRecord = new GlideRecord(table);
if (caseRecord.get(sysId) && caseRecord.active == true)
return true;
return false;
})(inputProperties);
Results :
New record :
Existing record :
Please mark this as helpful and accept it as a solution if this resolves your query.
Thanks,
Sujatha V.M.
Sujatha V.M.