Related List not displaying records in Platform View

Mukesh Khanna P
Tera Expert

I've created Related list to show expired "Special Handling Notes" on my case type table intented to show the expired special handling notes created from the following tables "Consumer" / "Contact" / "Account". It is working as expected for the admin users in both platform and workspace view.

When I impersonate non-admins like customer service agent / consumer service agent. the related list in the workspace is showing the filtered special handling notes record in the custom related list, but in the platform view of the case type, the custom related list is displayed empty with "No Records" message. Feeling it difficult to find reason for this behaviour. Kindly help me to resolve this issue.

Here is the simple query I've written for the relationship record.

(function refineQuery(current, parent) {current.addEncodedQuery("table_name=customer_contact^ORtable_name=customer_account^ORtable_name=csm_consumer^status=3");

})(current, parent);

@Chuck Tomasi @Pradeep Sharma @Ankur Bawiskar 



16 REPLIES 16

Hi @Ankur Bawiskar 
I've replicated the requirement in my PDI as well, there too I'm facing same issues for non-admin users the related list records are not visbile in platform view but available in workspace view. The odd thing that I see in platform view is even though If I'm not displayed with any records, the select all check-box is visible near search icon in the custom related list. I've also check the query business rule and ACL of the "special handling notes" table, nothing is creating conflict with this requirement. Kindly help me to resolve this error, I don't think this is client instance related problem to raise HI ticket. 

@Mukesh Khanna P 

if that's the case then definitely something is configured which is OOB and restricts it for non-admins

 

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Ankur Bawiskar 
Can you help me with any resolution for this issue, as far as I've looked into the OOTB configs, I'm not able to find fix for this behaviour.

@Pradeep Sharma 
I've replicated this issue in my PDI, can you kindly take a look at this issue and help me to find resolution for this one. This is a high priority urgent requirement, your immediate help would be greatly appreciated.

Thanks in advance!

@Ankur Bawiskar 
I've found the special handling table level ACL which is creating problem for this issue. Here is the OOTB ACL script which is restricting the records to show up in the related list. My requirement is to show expired notes for specific table without any parent relation to the record.

ACL Script:

answer = false;
if(current.isNewRecord())
answer = true;
else {
if(current.table_name){
if (typeof parent !== 'undefined' && parent !== null) {
var notes = new global.SHNProcessor().getNotes(parent.getRecordClassName(),parent.sys_id);
answer = notes !== undefined && notes.length > 0 && notes.indexOf(current.sys_id+'') != -1;
} else {
var gr = new GlideRecord(current.table_name);
if(current.related_record) {
gr.get(current.related_record);
answer= gr.canRead();
} else {
answer = gs.hasRightsTo("record/"+current.table_name+"/read",null);
}
}
}
}