- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2019 08:18 AM
Hi Team,
I want to highlight color in the Activity log of the Incident when the Priority changes.
In this image I want the side grey bar to be red on Field change(whenever Priority is updated). Or the whole background of this Activity to be red.
I have tried the below in System Properties:
Still it is not working. Please suggest some solution.
Basically I want to highlight in the Activity log with some color whenever Priority changes.
My instance is Kingston.
Thanks in Advance.
Aac
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2019 08:23 AM
Are you OK with priority being BOLD RED? Because getting the background requires more DOM/CSS coding.
use
cell.style.cssText = "color: red;font-weight: bold;";
//instead of
//cell.style.cssText = "background-color: red";
Vinod Kumar Kachineni
Community Rising Star 2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2019 09:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2019 03:07 AM
Hi Mike,
Setting this property with only 'Gold' as value is also not working. Do we call the new system property created from somewhere? If yes ,can you suggest from where we can call this property. Because I think every property is called from some script or somewhere. And that may be the reason our newly created property is not getting triggered.
Thanks
Aac
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2019 09:49 AM
I would first try with the system property as Allen suggested.
As a work around you could do some DOM manipulation
Type onLoad
Isolate script : unchecked
UI type: all
function onLoad()
{
//alert('hi on load');
var fieldsList = document.getElementsByClassName("sn-widget-list-table-cell");
for(var i=0; i<= fieldsList.length-1; i++)
{
var cell = fieldsList[i];
//console.log("cell = " + cell.innerText);
if(cell.innerText == 'Priority')
{
var nextCell = fieldsList[i + 1];
if(nextCell)
{
if(nextCell.innerText.indexOf("was") !== -1)
{
//console.log("Found the priority change cell");
cell.style.cssText = "background-color: red";
console.log("color changed to red");
}
}
}
}
}
Vinod Kumar Kachineni
Community Rising Star 2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2019 03:10 AM
Hi Kachineni,
Where do you suggest to write this script? Dis you want to mention Client script? If yes then which table should be selected? Incident table?
And where is this Isolated script:unchecked present?
Thanks
Aac