close incidents

tGhadage
Tera Contributor

Hi Guys, 

 

Can we attach the files  on the incident who's state is closed.

 

Thanks,

Tushar

1 ACCEPTED SOLUTION

Anand Kumar P
Giga Patron
Giga Patron

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 

View solution in original post

9 REPLIES 9

Harish Bainsla
Kilo Patron
Kilo Patron

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

 

Sanket Landge
Tera Expert

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  

Anand Kumar P
Giga Patron
Giga Patron

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 

Thanks for the help.

Mark Roethof
Tera Patron
Tera Patron

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

LinkedIn