Highlight VIP Caller and Legal Hold Caller

rachelconstanti
Mega Sage

We currently have incident, request, requested item and sctask setup to highlight the caller if they are flagged as VIP.

We have a need to also highlight the caller if they are on legal hold.

I was able to get legal hold working for incident and request but am getting stuck with requested item and sctask.  

I seem to be getting stuck if the caller is both a VIP and on Legal Hold.

 

I am using the OOB 'Highlight VIP Caller' client script.  

What does this code do?

g_form.getReference('caller_id', vipCallerCallback);
}

function vipCallerCallback(caller) {
var callerLabel = $('label.incident.caller_id').down('label');
var callerField = $('sys_display.incident.caller_id');
if (!callerLabel || !callerField)
return;

 

Anyone have to configure something like this?

How did you script this?

Any suggestions are welcome!

 

Thanks,

Rachel

3 REPLIES 3

Tony Chatfield1
Kilo Patron

Hi, without any clear details of your configuration and code it is not possible for the forum to assess differences between your working functionality and your non-working functionality. Perhaps you could update this thread with clear details of your configuration, your code in plain text format and very clear details of your diagnostics -what works\what doesn't work and where the issue appears to be.

I am trying to modify the OOB 'Highlight VIP Caller' client script.  I believe my issue is with the vipCallerCallback.  Can you help me understand what this is doing?

 

This is the script:

 

 

function onChange(control, oldValue, newValue, isLoading) {
var callerLabel = $('label.incident.caller_id');
var callerField = $('sys_display.incident.caller_id');
if (!callerLabel || !callerField)
return;

if (!newValue) {
callerLabel.setStyle({backgroundImage: ""});
callerField.setStyle({color: ""});
return;
}
g_form.getReference('caller_id', vipCallerCallback);
}

function vipCallerCallback(caller) {
var callerLabel = $('label.incident.caller_id').down('label');
var callerField = $('sys_display.incident.caller_id');
if (!callerLabel || !callerField)
return;

//check for VIP status
if (caller.vip == 'true') {
var bgPosition = "95% 55%";
if (document.documentElement.getAttribute('data-doctype') == 'true')
bgPosition = "5% 45%";

rachelconstanti
Mega Sage

I am trying to modify the OOB 'Highlight VIP Caller' client script.  I think my issue is with the 'vipCallerCallback'

 

What does the vipCallerCallback do?  Is this calling a script from somewhere else?

 

g_form.getReference('caller_id', vipCallerCallback);
}

function vipCallerCallback(caller) {
var callerLabel = $('label.incident.caller_id').down('label');
var callerField = $('sys_display.incident.caller_id');
if (!callerLabel || !callerField)
return;