Disable Attachment Upload on Service Portal for Closed RITM

abhijee
Tera Contributor

Hello Team,

I am working on a requirement to disable the attachment upload option on the Service Portal once a Requested Item (RITM) reaches a closed state (such as Closed Complete).

The expectation is that after the request is closed, users should not be able to add any new attachments from the portal (Attachment tab).

I have already tried using the disable_attachment method, but it is only working in the native UI and not on the Service Portal.

Has anyone worked on a similar requirement before? Could you please guide me or suggest a solution?

Thank you in advance.

7 REPLIES 7

Rakesh_M
Kilo Sage

hi @abhijee ,
if you want to display attachment tab but restrict adding attachments refer Disable Attachment on Portal
if you want to hide attachments tab when state is closed :

1.Goto Standard Ticket Configuration

2.Select record where table is sc_req_item.
3.Under Tab Configurations related list select attachment
4.Update visible condition as per requirement.

 



Shivam soni
Tera Contributor

Create ACL for record based operation like create or update  on the SYS_ATTACHMENT table.
with script :
var ritm = new GlideRecord('sc_req_item');
if(ritm.get(current.table_sys_id)){
if(ritm.active == false){
return = false;
}else{
return = true;
}
}

Ankur Bawiskar
Tera Patron

@abhijee 

you can handle this using Table.None WRITE ACL on sc_req_item

if user fails the table level WRITE ACL then can't add attachment

See OOTB ACLs and add condition as State [IS NOT ONE OF] Closed Complete/Closed Incomplete/Close Skipped

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

Hello @Ankur Bawiskar @Rakesh_M 

The standard ticket configuration is applying to all catalog items, but we need it only for one specific catalog item.

I tried using a write ACL on the sc_req_item table with a state condition, but it is not working.

Also, I want to make the comment field read-only on the Service Portal when the RITM is in Closed Complete state. I tried using UI Policy and Data Policy, but it is not working.

Can anyone please guide me on what I might be doing wrong and what is the best approach for this?

Thank you.