Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

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.

4 REPLIES 4

Rakesh_M
Tera Guru

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

Ankur Bawiskar
Tera Patron

@abhijee 

if this is for ticket page then you can update the config in Standard Ticket Configuration for sc_req_item

55.png56.png

Output: This will hide the attachment tab but the paper-clip icon will still be shown

56.png

💡 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