Showing posts with label How to Display Custom icon images on Incident Form and in List View in Service Now. Show all posts
Showing posts with label How to Display Custom icon images on Incident Form and in List View in Service Now. Show all posts

Wednesday, May 31, 2017

How to Display Custom icon images on Incident Form and in List View in Service Now

This blog explains how to display special icons on Incident form (Caller field) based on user profile settings.

Example :

If 'Affected Person' belongs to 'VIP' then display 'VIP' icon image in 'Users' List view as well as on 'Incident' form

Solution

- Create a Client Script as shown below



- Upload the required icon image to System UI -> Images
- Write down below code under script.

if (caller.vip == 'true') {
callerLabel.setStyle({backgroundImage: "url(images/icons/vip.gif)", backgroundRepeat: "no-repeat", backgroundPosition: bgPosition, paddingLeft: '30px' });
}
- Whenever 'Affected Person' field value is selected, if the selected user belongs to 'VIP' then 'VIP' flag will be shown on Incident as shown below.



- To display the icons in List view , Below are the steps
- Goto Sytem UI -> Field Styles
- Create new one as shown below



- Below is how shown in List view.