- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2016 11:22 PM
Hi All,
I'm facing a typical issue on Field Style. Hope you can provide solution to this. Here is the issue:
I have applied same field style to both Caller field and Assigned to field on Incident form to display the VIP icon beside the field if the selected user is VIP. The Field Style applied on Caller field is an OOB one. Just created the same Field style for Assigned to field and modified the Field name & Value to Assigned to in order to apply the same style on the field.
Surprisingly, the Assigned to Field Style is not working on form view. Whereas, I can see the style applied to both the fields on List view. Please see the screenshots below.
The Field style for Assigned to field is given below. The only relevant changes are there for Caller field Field style is there and working fine:
Table: Incident
Field name: Assigned to
Value: javascript:current.assigned_to.vip == true;
Style:background-image: url('images/icons/vip.gif');
background-repeat: no-repeat;
background-position: 98% 5px;
padding-right: 30px;
Any help will be highly appreciated!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2016 12:43 AM
Field style doesn't work usually on form layout if the value of field style contains 'javascript:' (Dynamic condition). If you can hard code some condition, it might work well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2016 11:35 PM
Hi Amlan,
I think u should try with java script, it will work.
document.body.style.backgroundImage = "url('images/icons/vip.gif')";
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2016 11:51 PM
Hi Prakash,
Thanks for your reply.
Can you please elaborate what exactly you meant by javascript? Do you suggest me to write a new Client script or to modify the Field Style? If it is Client Script then I'm not in favor of that, as for this we have to write it every places where the similar problem occurs. But if it is the Field style, then request you to guide me to achieve so.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2016 12:12 AM
Hi Amlan
Please use below css in style configure of the field
background-image: url("10off.png");
background-repeat: no-repeat;
background-position: 98% 5px;
padding-right: 30px;
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2016 12:38 AM
Hi Prakash,
Tried with your input. But the issue still exists. The style is applying only on List view, not on Form view.
Can you please suggest any alternative solution for this?