Hiding Attachment using ACL

Mag_ Tomer Harp
Giga Expert

I wrote this very simple script in both  - sys_attachment (read) and sys_attachment_doc (read).

for sys_attachment :

answer = getAttachmentReadAnswer();
function getAttachmentReadAnswer() {


if (current.table_name == 'u_sbm_hr_case' || current.table_name == 'u_sbm_hr_task')
    return false;


return true;
}

for sys_attachment_doc :

answer = getAttachmentReadAnswer();
function getAttachmentReadAnswer() {


if (current.sys_attachment.table_name == 'u_sbm_hr_case' || current.sys_attachment.table_name == 'u_sbm_hr_task')
    return false;


return true;
}

 

As you can see beside table name there are no conditions (and I also unchecked the Admin Override )

 

but still I can go to attachments which are related to these tables. 

Any idea ?

Thx

1 REPLY 1

Knight Rider
Mega Guru

Hi,

Also, CHECK if there are OTHER ACLS on Attachment ACLS and make them INACTIVE to test.

Remove from function and remove

return false;

 

replace it with 

answer = false;

 

Thanks!!

Please mark as correct/helpful, if this helps!!