Highlight VIP caller

sid23
Mega Contributor

Hi Everyone,

As we know, that we have an OOB feature called "Highlight VIP Employee" used in incident form or hr case forms. We have a requirement to have the same functionality which is - " In the list view have VIP icon/image beside the opened_by field on chat records.(This i was able to achieve, by assigning a new style to it and it worked). When i open a chat record i want to highlight the person's name in the "opened_by" field to "Red color" as we see on the incident or hr case forms. I have applied a client script - 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
g_form.getReference('opened_by',setColor);
}
function setColor(openedby) {
var openedbyField = g_form.getElement('sys_display.' + g_form.getTableName() + '.opened_by');
if (openedby.vip == 'true')
openedbyField.setStyle({color : "red"});
else
openedbyField.setStyle({color : ""});
}

 

But its not working. Any suggestions?

26 REPLIES 26

sid23
Mega Contributor

I tried to apply the same but it's not working for chat records.

Sid

Can you try it in your PDI once and check if it is working there? Please find the XML file and import it in your PDI instance. 

Please let me know how it goes.

Thanks!

sid23
Mega Contributor

As you can see i am getting the VIP icon beside opened by field in list view. This i was able to achieve by creating a new style. But when i go into that record the opened by field is not highlighted in red. Please see the attached screenshots.

 

 

find_real_file.png

 

 

find_real_file.png

The below code only changes the VIP user name color to Red. For the STAR icon to display your instance should have the image I'm using below i.e. (vip_user.png) else it doesn't work.

Thanks!

sid23
Mega Contributor