Hide 'Agent Assist' on a new Record in Configurable Workspace

Nitin_NOW
Tera Guru

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:

Nitin_NOW_0-1714759967232.png

 

Configurable Workpace vs Agent Workspace

Nitin_NOW_1-1714760655928.png

 

Is there a setting/configuration to hide the Agent Assist on CW? TIA

 

Thanks,

Nitin

 

 

10 REPLIES 10

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

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?  

@Nitin_NOW,

Change the following

  if (sysId == '-1') { // new case
        return true;
    }
 

to:

  if (sysId == '-1') { // new case
        return false;
    }
   

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.

@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 : 

SujathaVM_1-1715007392540.png

 

Existing record : 

SujathaVM_0-1715007369677.png

 

Please mark this as helpful and accept it as a solution if this resolves your query.

Thanks,

Sujatha V.M.

 

Please mark this as helpful and accept it as a solution if this resolves your query.
Sujatha V.M.