Hide internal attachments from ESS users

David Morden
Mega Expert

We previously used the business rule below to hide internal attachments on incidents from end users (ESS users).   However, it is also blocking those users from viewing images in KB articles, which makes sense due to those images being embedded attachments from the sys_attachment table.   I've tried numerous iterations of adding "Table name" filters to the "When to run" tab, and trying various forms of adding the table name condition to the script.   None of these have worked.

Can anyone help me to update the BR to apply only to the incidents table when viewing attachments?

find_real_file.png

**Note: there are currently no filters set on the When to run tab, and the attachments are hidden from ESS users everywhere, unless they added the attachment.

1 ACCEPTED SOLUTION

David Morden
Mega Expert

I was finally able to get this working through some input from my new counterpart, thanks Derek Young!   Below is the approach that works.



find_real_file.png


View solution in original post

7 REPLIES 7

Before Query

bricast,

rexked is exactly right.  The 'When to run' is set to a before condition with query checkbox selected.

As soon as I add && (gr.getTableName() != 'kb_knowledge') to the condition this no longer works for Service Portal.  Any idea on how I can make this work in service portal without the users loosing access to attachments that are in knowledge bases.