How can we bring Customer Visible on sc_task table?

m_servicenow
Kilo Contributor

Hello Everyone ,

Please suggest me how to add Customer visible in Additional Comments fields on sc_task table. But this is already visible on incident table
like :Additional comments (Customer visible):

How can i bring this on sc_task(Catalog task) table as well. One client script is written on task name is(Modify Comments Label). But not getting how to bring (Customer visible): on sc_task table.

Any help would be appreciated.

4 REPLIES 4

TJW2
Mega Guru

Right Click on header, select 'Personalize --> Form Layout' and Include the field 'Additional Comments'

If you want the 'Additional Comments from the RITM table you can select 'Request Item (expand with +)' and then select Additional Comments.


But this field is visible through Request item.Additional comment on sc_task table.

What i m looking is "Customer visible" Label is not appearing on sc_task table reason is this is coming from sc_req_item table.

Please help me why this is not visible but from where it is coming there is already this label appears.

See screenshot please.
One client script is written on task table that is "Modify Comments Label".



function onLoad() {
if (!g_user.hasRole("itil"))
return;

var table = g_form.tableName;
var fieldFormName = table + ".comments";
var fieldLabelName = 'label.' + fieldFormName;
var ctrl = $(fieldLabelName);
if (!ctrl)
return;

var label = ctrl.select('label')[0];
if (!label)
return;

var s = label.innerHTML;
label.innerHTML = s.substring(0, s.length - 1) + ' (' + getMessage('Customer visible') + '):';
//label.setStyle({fontWeight:"bold"});
}

Suggest me how can achieve customer visible on sc_task table as well.


You can create a new label for the sc_req_item table on the Additional Comments field; however you would then have to modify this script to NOT run on this table.
Or
You would need to modify this script to allow for 'derived' fields.


semhar_yemaneab
ServiceNow Employee
ServiceNow Employee

Create a new client script on the Catalog Task (sc_task) table and enter the following script.

function onLoad() {
if (!g_user.hasRole("itil"))
return;

$('label.sc_task.request_item.comments').select('label')[0].innerHTML = "Additional Comments (Customer Visible)";
}