How to add phone icon in the place of info icon at right side of caller field

srinivas snow25
Kilo Contributor

How to add phone icon in the place of info icon at right side of caller  field

4 REPLIES 4

Community Alums
Not applicable

Hi @srinivas snow2295 ,

This 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.

 
Mark my answer correct & Helpful, if Applicable.

Thanks,
Sandeep

Community Alums
Not applicable

Hi,

Any update to this ?Any follow-up required? if not

Kindly mark the answer as Correct & Helpful both such that others can get help.

Thanks,
Sandeep

Ankur Bawiskar
Tera Patron
Tera Patron

@srinivas snow2295 

Which caller field are you referring? incident?

You can add the icon using UI macro for the field if it's reference type using the field attribute

ref_contributions=UI Macro_name

check this link

UI Macro in ServiceNow

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@srinivas snow2295 

Hope you are doing good.

Did my reply answer your question?

If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader