worknotes on vulnerable item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2024 02:19 AM
Hi All,
Recently we upgraded the vulnerability response plugin, after that plugin upgradation we are getting the Risk score related work notes like below
And this functionality is configured in one of the OOB script include 'VulnerabilityCalculatorCommonBase '
Now my client is asking to hide this work notes without touching the OOB script. Is their any possibility to achieve it .
I will appreciate your kind help , If you share it.
Thank you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2024 08:48 AM
The only thing I can think of is remove work notes from the activity but I'm guessing they don't want to hide all work notes correct just this specific one? If that is the case I'm not sure you will be able to do anything unless you edit the OOB script that sets the comments. Since it is a script include I would not recommend that but ask why they want to hid the work notes. Typically only users who have fulfiller access can see them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2024 12:20 PM
Hi Brian Lancaster,
Thank you for your response. They want to hide that content in work notes because of some audit issue. They already raised a Hi case on this and the proposed solution is to comment few lines in the OOB script include. But i am trying to achieve it through client script or ACL. Is it possible to achieve it through client script or ACL. Please reply to it.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2024 02:35 PM
Hi Brian Lancaster,
Thank you for your response. Yes I need to hide only that specific content that I mentioned in the snip. And the reason for hiding that content is because of some audit issue. They already raised a HI- Case on this and the proposed solution is to update some methods in the OOB script include. But I am trying to achieve it through CLIENT SCRIPT or ACL. By any chance can we achieve this by those two methods. Could you please help on fixing this issue by either client script or ACL. please reply Thank you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2024 09:45 AM - edited 10-11-2024 09:46 AM
Note: Please read the entire post.
ACL can only hide a field so it would hide work nots all together. I'm not sure a client script would be able to hide one work note without there being some sort of major DOM manipulation. Which as I'm sure you know is not pest practice. I had two other thoughts; both have possible issues.
- Business rule:
- Create a before insert/update business rule (I'm not sure if it needs to be both a before and an insert as I don't know when this run).
- On the When to run tab choose the condition of work notes changes
- Then in the advanced tab add the following code. You may want to add more in the startsWith code.
(function executeRule(current, previous /*null when async*/) { // Add your code here if (current.work_notes.startsWith("Calculator")){ current.setAbortAction(true); } })(current, previous);
- Another Business rule:
- This business rule would run with the same conditions.
- You would have to try and programmatically do what is a manual task to remove a work note or comments that was added to the system. See this KB article
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0520375
Issue with these two options are as follows. For the first business rule, I have. I am doing a set about action. This could cause other workflow that are occurring at the same time to stop running. Which could of course cause other issues.
For the second business rule I think the code would be rather difficult. So, I’m not sure this is the best option either. It may be best to follow ServiceNow recommendations.