Few users are not able to see the fields on My Tasks in EC Pro

Janu sree
Tera Guru

Hi Community,

 

I've written a configuration of change approvals and knowledge approvals in 'My tasks'  Few users are not able to see the fields on my tasks the record itself is showing as null, there is a record I've verified the script in widget both logs are passing to the users who are able to see the fields, but for few users fields are not visible and also only one log(sys_id). Is that some role ? Please help me with your insights.

server script(This is working for few usrs)

(function() {
data.pickupMsg = gs.getMessage(options.pickup_msg);

data.labelClose = gs.getMessage("Close");
var tableName = options.table || $sp.getParameter('table');
tableName = "change_request";
var sysId = options.sysId || $sp.getParameter('sys_id');
var record = sn_std_tkt_api.TicketConfig.getTicketRecord(tableName, sysId);
gs.addInfoMessage((sysId));
if (record == null)
return;

data.canRead = record.canRead();
if (!data.canRead)
return;

var gr = new GlideRecord("change_request");
gr.get(sysId);
//var gr = $sp.getRecord();
if (gr == null)
return;

data.canRead = gr.canRead();
if (!data.canRead)
return;

gs.addInfoMessage("GlideRecord sys_id: " + gr.getUniqueValue());

var agent = "";
var a = $sp.getField(gr, 'assigned_to');
if (a != null)
agent = a.display_value;

var fields = $sp.getFields(gr, 'number,requested_by,u_change_reason,opened_at,opened_by,cmdb_ci,u_impacted_country,state,short_description,priority,sys_created_on,conflict_last_run,u_impacted_bu,u_environment,assignment_group,impact,u_ppm_project_id,assigned_to,start_date,end_date');
if (gr.getValue("sys_mod_count") > 0)
fields.push($sp.getField(gr, 'sys_updated_on'));
data.tableLabel = gr.getLabel();
data.fields = fields;
data.agent = agent;
data.agentPossible = gr.isValidField("assigned_to");
data.table = gr.getTableName();
data.sys_id = gr.getUniqueValue();
})()




Janusree_0-1700099746614.png

Janusree_1-1700099995612.png

 

 

7 REPLIES 7

@Janu sree 

 

Try the following article or give them sn_change_read role (this role will be available if you have installed com.snc.itsm.roles plugin ) or create an ACL to have approver_user role to have read access on change_request table.

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0620977

 

Thanks,
Anvesh

@AnveshKumar M  - When I tried giving the ITIL role to the user, he is able to see the approval records, Is this the correct way I'm checking ? I didn't any other role which is relevant to change/ and also I observed the same thing happening for other users on Knowledge approval as well

@Janu sree You can give them sn_change_read role or create a new ACL on change_request table and kb_knowledgr table to have read access for approver_user role.

Thanks,
Anvesh