How to give red color to opened by field of incident when opened by time become more than 48 hours?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2022 01:21 AM
There is one requirement on incident list view. When incident opened time become more than 48 hours, Opened field should become red in color on load of form list view. How to achieve this?
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2022 01:50 AM - edited ‎10-28-2022 01:51 AM
Hello,
Create new script include with below code and field style in sys_ui_style table and try
var grScReqItem = new GlideRecord('sc_req_item');
grScReqItem.addEncodedQuery("opened_atRELATIVELT@hour@ago@48");
grScReqItem.orderByDesc('sys_created_on');
grScReqItem.query();
if (grScReqItem.next()) {
return true;
}
return false;