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

I don't see any documentation or even a hint/tooltip on that field. Can you explain what "isolate script" does and why someone would need to use it?

No, I can't.

I had to replicate the VIP caller functionality for call, and did the Style thing, and saw that it worked in the list, but not on the form.  So I did a Google search, and came up with something, somewhere, that I can't remember now, that told me I needed the client script, and that it had to have that flag set to false. (I think it was a community post that had the answer marked as the right answer, but I'm not sure.) I didn't even know the client script existed out of the box at that point, or that the field existed, for that matter. 

I copied the out of the box client script to a new version for the new_call table, and it didn't work.  I checked the script (using Show XML), and the system had turned isolate script back to true, despite the fact that I did an insert and stay on a client script that had it set to false.  So I added it to the list, set it to false, and then tried it.  It worked fine at that point.