- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2023 07:27 AM
Hi Team,
There is a requirement to change the color of user added worknotes to blue or any other color. So that it can be easily identified which is added as system notes and which is added as user notes
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2023 08:00 AM - edited 04-10-2023 08:32 AM
@Community Alums
While its not ideal to run DOM, you could use an onload client script to do it:
function onLoad() {
var divs = document.getElementsByClassName('h-card');
for(var i = 0; i < divs.length; i++){
if(divs[i].innerHTML.indexOf('System') != -1){
var html = divs[i].innerHTML;
html = html.replace(/gold/g, "red");
divs[i].innerHTML = html;
//console.log(divs[i]);
}
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2023 07:31 AM
@Community Alums
I would change it back to "h-card" since the "h-card-wrapper" will update all cards with gold if any "system" text is found within all cards. Here is what I get when I use "h-card" class name reference.
I am not sure why the notes tab is getting changed to red as well for you, that does not occur for me 🤔 does you notes table have the gold color in it by chance?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2023 07:31 AM
@Community Alums
I would change it back to "h-card" since the "h-card-wrapper" will update all cards with gold if any "system" text is found within all cards. Here is what I get when I use "h-card" class name reference.
I am not sure why the notes tab is getting changed to red as well for you, that does not occur for me 🤔 does you notes table have the gold color in it by chance?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2023 08:25 AM
Grea88 thanks its resolved now..
There was one more client script written on load which was causing the issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2023 06:08 AM - edited 04-12-2023 06:31 AM
@Dom Gattuso Actually I am writing this on task table so that this can be applied to all the tables that are extended.Now there is a table called Order Task(sn_ind_tmt_orm_order_task) , Here System work notes are also of 'Gold' color therefore our script is also updating that color as well to red
Actually that means the below condition is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2023 06:33 AM
@Community Alums - Since you are doing it on the task table, please ensure you have selected the inherited checkbox on the client script:
This will allow it to run on all task extended tables.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 06:59 AM - edited 10-12-2023 07:01 AM
@Dom Gattuso This is working fine now but we have come across an issue wherein the hyperlink is not getting pasted on worknotes.Its getting disappeared I wrote onLoad client script to write the below code: