How to hide manage attachments button on record producer

Deepthi25
Giga Expert

HI,

Can you please suggest how to remove edit buton for only 1 record producer.

For this I am trying on load client script as follow, but it is not working can any suggest on this.

function onLoad() {

document.getElementById('header_add_attachment').style.display = 'none';

}

And I need to give "Add attachments" link/button on middle of form and when I click that link/button it shouls be able to upload 1 file and save it in "ATTACHMENTS" table.

Thanks

1 ACCEPTED SOLUTION

Hi Radhika,



It should be


function onLoad() {


  g_form.disableAttachments()


}



View solution in original post

14 REPLIES 14

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Radhika,



Please create a client script and hide it with help of "disableAttachments". Please refer section 14.5 here.


http://wiki.servicenow.com/index.php?title=GlideForm_(g_form)#disableAttachments


Hi Pradeep



I tried now, like below. But not working



function onLoad() {


  void disableAttachments()


}


Hi Radhika,



It should be


function onLoad() {


  g_form.disableAttachments()


}



HarshTimes
Tera Guru

Hi Radhi


Create a on load client script on that record producer and Put below script



function onLoad() {


    //Type appropriate comment here, and begin script below


var attachment_header = document.getElementById('sc_attachment_button');


attachment_header.style.display='none';


}



Regards


Harsh