How to Disable Attachment from Incident Form??

SandeepKSingh
Kilo Sage

Hi EveryOne,

 

Can you please tell me how we can disable an Attachment from Incident form?

@Ravi Gaurav can you help

2 ACCEPTED SOLUTIONS

Ravi Gaurav
Giga Sage

You can use the below on Client Script:-

 

g_form.disableAttachments();
 
you can use onLoad or onChange based on the requirement.
 
 

View solution in original post

Ravi Gaurav
Giga Sage

Can you try this on BR (after Insert)

 

// Set the Attachments field to readonly
function onDisplay() {
var gr = new GlideRecord('incident');
gr.addQuery('sys_id', current.sys_id);
gr.query();
if (gr.next()) {
gr.attachments.setReadOnly(true);
}
}
please let me if it works

View solution in original post

2 REPLIES 2

Ravi Gaurav
Giga Sage

You can use the below on Client Script:-

 

g_form.disableAttachments();
 
you can use onLoad or onChange based on the requirement.
 
 

Ravi Gaurav
Giga Sage

Can you try this on BR (after Insert)

 

// Set the Attachments field to readonly
function onDisplay() {
var gr = new GlideRecord('incident');
gr.addQuery('sys_id', current.sys_id);
gr.query();
if (gr.next()) {
gr.attachments.setReadOnly(true);
}
}
please let me if it works