- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2024 11:05 PM
Hi Guys,
Can we attach the files on the incident who's state is closed.
Thanks,
Tushar
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2024 11:18 PM
Hi @tGhadage ,
You cannot attach attachment for the closed incident there will be client script that will disable attaching attachment on load you have to deactivate this client script.
Client script name: (BP) Hide Attachment Link when Closed
Script:
function onLoad() {
if (g_form.getValue('incident_state') == '7' || g_form.getValue('state') == '7')
g_form.disableAttachments();
}
Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2024 11:10 PM
Hi @tGhadage yes you can attach file on incident when state is closed for more check below link
https://www.servicenow.com/community/itsm-forum/attachments-to-close-incidents/m-p/625190
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2024 11:17 PM
Hello @tGhadage ,
We can attach,
var gr = new GlideRecord("sys_attachment");
if(gr.get("ATTACHMENT_SYSID")) {
gr.table_sys_id="INCIDENT_SYSID";
gr.table_name="incident";
gr.update();
}
Or you can insert the new record in sys_attachment table foe specific record and it will show for that incident
Thanks,
Sanket Landge
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2024 11:18 PM
Hi @tGhadage ,
You cannot attach attachment for the closed incident there will be client script that will disable attaching attachment on load you have to deactivate this client script.
Client script name: (BP) Hide Attachment Link when Closed
Script:
function onLoad() {
if (g_form.getValue('incident_state') == '7' || g_form.getValue('state') == '7')
g_form.disableAttachments();
}
Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2024 11:36 PM
Thanks for the help.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2024 11:19 PM
Hi there,
Which files are you refering to? Don't see any in your post.
Or do you mean attachments in general? Out-of-the-box yes you can. If this is the case at your customer instance, we can't tell of course.
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field