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

Ravi Kumar
ServiceNow TechMinds
2 min readMar 13, 2019

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.

http://fortunemindsservicenow.blogspot.com/

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

http://fortunemindsservicenow.blogspot.com/

- Below is how shown in List view.

http://fortunemindsservicenow.blogspot.com/

About Ravi Kumar:

Ravi Polishetty (ravi@fortuneminds.com) is an IT Expert covering 15+ years of experience in design/architect/developing Enterprise and Cloud-based Applications; as well as working on IT and Software projects for the top Fortune 1,000 companies using ServiceNow, Oracle Fusion Middleware, and Java/J2EE technologies. He is also a ServiceNow SME with a versatile set of experience in the Design, Development, and Implementation of ServiceNow Applications.

--

--

Ravi Kumar
ServiceNow TechMinds

ServiceNow Architect | Entrepreneur | Technology Trainer | Startup Mentor