How to hide "delete" and "write" icon on attachment widget in the service portal

priisholm
Mega Expert

Hi 🙂

Is it possible to hide (or delete) the "delete" and "write" icons on the attachment widgets in the Service Portal?

Our users should not be able to remove already added attachments og change the name of of attachment (we should only be able to do this in the backend).

find_real_file.png

Its the "widget-ticket-attachment"... I already made a clone of this, so its editable.

find_real_file.png

Thanks

Soren

1 ACCEPTED SOLUTION

priisholm
Mega Expert

Hi



Found it.



The 2 icons "delete" and write is shown when the ACL allow the user to do so...



So look for "delete" and "write" on the "sys_attachment".



BR
Soren


View solution in original post

3 REPLIES 3

priisholm
Mega Expert

Hi



Found it.



The 2 icons "delete" and write is shown when the ACL allow the user to do so...



So look for "delete" and "write" on the "sys_attachment".



BR
Soren


Hi Priisholm,

 

I had created new write and delete ACL's on sys_attachment table to allow only 'write' or 'delete' asccess only for active Case tickets which are not 'Closed' or 'Cancelled'. However the 'Edit' and 'Delete' icons are still visibile on the portal for 'Closed' cases. I have pasted the script below for ACL. Please help me to understand what I am doing wrong.

 

answer = getAttachmentWriteAnswer();

function getAttachmentWriteAnswer() {
var tableName = current.table_name;
var parentRecord = new GlideRecord(tableName);
parentRecord.addQuery('sys_id', current.table_sys_id);
parentRecord.query();
if (parentRecord.next()) {
var status = parentRecord.getValue('state');
if (status != 3 || status != 7) {
return true;
} else return false;
}


}

Thanks,

Devika Shukla

chaitrashree h2
Tera Contributor

I have same requirement where particular users only can delete attachment . But when we create delete ACL it is removing add attachment(paper clip) too.

 

Can anyone help me on this