- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2023 12:43 AM
The (customer visible) message I should not see on the problem record , I know that there is client script called "Modify Comments Label" running on the task table , From that It is coming , But I should not modify the existing client script , I want to create another client script to remove the (customer visible) on the problem form .
How to achieve this with code ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2023 04:23 AM
@Sk Sharukh1 Tried and tested solution.
Add below code to the newly created client script:
function onLoad() {
if (!g_user.hasRole("itil"))
return;
if (!g_form.hasField('comments'))
return;
var labelText = g_form.getLabelOf('comments');
if (labelText.substring(labelText.length-1) == ':')
labelText = labelText.substring(0, labelText.length -1);
labelText = labelText.split("(Customer visible)")[0];
g_form.setLabelOf('comments', labelText);
}
And after saving the client script make the order as 1000 like below from list view as order field is not available in form layout
Result:
Please mark as correct answer if this solves your issue.
ServiceNow Community Rising Star, Class of 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2023 12:53 AM
Hi Sk,
Just check sys_document table which holds label change ,try to change label from table .
Thanks,
Manjusha Bangale
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2023 01:13 AM
Hi Manjusha,
Iam referring to (customer visible message ) which is highlighted in the above screenshot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2023 01:19 AM
@Sk Sharukh1 You can create a similar client script like "Modify Comments Label" on problem table and remove the (Customer Visible) from it.
Please mark as correct answer if this solves your issue.
ServiceNow Community Rising Star, Class of 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2023 04:00 AM
@jaheerhattiwale , Still able to see the same (customer visible field ) message after removing also
code below:
function onLoad() {
if (!g_user.hasRole("itil"))
return;
if (!g_form.hasField('comments'))
return;
var labelText = g_form.getLabelOf('comments');
if (labelText.substring(labelText.length-1) == ':')
labelText = labelText.substring(0, labelText.length -1);
labelText += new GwtMessage().getMessage(' ');
g_form.setLabelOf('comments', labelText);
}