VIP CALLER IN SOW

joel1202
Tera Contributor

Can he highlight VIP Caller in SOW Workspace in a form view ? If we can how we can do it ?

4 REPLIES 4

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

Check Sandeeps' response here

agent workspace - ServiceNow Community

-Anurag

Community Alums
Not applicable

Hi @joel1202 , 

I tried your problem in my PDI, and I got the answer, I hope this will help you 

 

I created "onLoad" client script. Please refer below code 

function onLoad() {
    //Type appropriate comment here, and begin script below
    if (g_form.getValue('vip') == true || g_form.getValue('vip') == 'true'){
        g_form.addInfoMessage('This user is VIP');
		g_form.addDecoration('vip', 'icon-star', 'VIP User', 'color-green');
	}
}

Here's the output 

SarthakKashya2_0-1712835872932.png

 

Please mark my answer correct and helpful if it works for you 

 

Thanks and Regards 

Sarthak

 

Aniket15
ServiceNow Employee
ServiceNow Employee

@joel1202 
Please try out below steps

  1. Create an onload client script.
  2. Refer to NDS icon list here (https://<your-instance>/now/nav/ui/classic/params/target/st_sys_design_system_icon_list.do)  NDS Icons are only supported for workspace like SOW.
  3. Add this line in the script section - g_form.addDecoration(<field-name>,  <icon-name-from-the-above-list>',This is an icon');
  4. Note: Second argument of the method is from the Icon list mentioned in the step 2. Legacy icon names which start with "icon" are not supported in workspaces.
g_form.addDecoration('caller_id', <nds-icon-name>, 'preferred member');
Please mark this answer helpful and correct if this solves your issue.