Display Image for OIP users similar to VIP users

prabh
Mega Expert

HI All,

 

I want to display image for OIP users like we have for VIP users in SNOW.


I checked the script "Highlight VIP Caller" and the url of the image given is "images\icon\vip.gif".(pls tell me from where i will find vip.gif)

 

I have uploaded the new image oip.gif in Images in SNOW. but donot know what should be the url for background image.

 

Please help how to set the background image.

1 ACCEPTED SOLUTION

Preety,



I have tested your requirement at my end here in Demo instance and found that your are using the wrong url, for your custom image you need to just past the name of your image in the url tab as


"url(img/TST.jpgx)" where you need to replace TST.jpgx with your own image.



Thanks!


View solution in original post

26 REPLIES 26

Preety,



As mentioned in the image definition that need to use x with format trailing the name of image, as jpgx, gifx, pngx so please change your script in field style as:


background-image: url('img/oip_new.gifx');


background-repeat: no-repeat;


background-position: 98% 5px;


padding-right: 30px;



And it will work as per your requirement.



Thanks!


Hi Rajeev,



Its working now. No need to use x . I just simply created field style again and its showing me the image.



Many Thanks for your help.



Regards,


Preety.


Jacob_Andersen
ServiceNow Employee
ServiceNow Employee

The trailing X is used for caching purposes.   You might not need the x but it is useful to have.   I always just use what is suggested by the system after you've added the icon/image to the images table.


Hi All,



Need one more help here please.



I got a requirement If the user is OIP or VIP then while selecting the user name from look up table in caller field in Incident table then its color should be different say red or blue to distinguish it from other users .I have used the below field style :



Table : sys_user


Field name : Name


Value : javascript:current.name.u_oip==true



Style


background-color:tomato;



But its not working.



Thanks in Advance !!



Regards,


Preety


Hi Preety,



As per your requirement you need to change in the VIP client script and need to define there the color you want to show for the user as per option. Please check in the below script:



  callerLabel.setStyle({backgroundImage: "url(images/icons/vip.gif)", backgroundRepeat: "no-repeat", backgroundPosition: bgPosition});


  callerField.setStyle({color: "red"});     You need to define the color name here you want to show for the user entry


  } else {


  callerLabel.setStyle({backgroundImage: ""});


  callerField.setStyle({color: ""});


  }



the option callerField.setStyle({color: ""}); you can add your color name for different option you are working on.



Thanks!