Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Disable renaming attachment

Tadz
Kilo Sage

Hi, is it possible to disable the renaming of the attachment?

Because i have disabled the attachment when the request is closed. using g_form.disableAttachments();

The g_form.disableAttachments(); works but I can still rename the attachment.

Is there any way to disable that?

Here is a sample screenshot:

attachment_renaming.PNG

Thanks,

Tadz

10 REPLIES 10

So I managed to hack this further today, thanks to the comment from mihirtat@gmail.com above.



I also modified the attachment UI Page to


  • set the value in line 83 of the HTML field to false
    This tag:
    <input type="hidden" id="ni.show_rename_link" name="ni.show_rename_link"
        value="${jvar_can_add_attachments}" />
  • set the value in line 345 of the Client script field to false
    this line: var allowRename = gel('ni.show_rename_link').value;


That seems to do the trick so far but I still have to test.



EDIT: Whoops... spoke too soon.   Still problematic for files uploaded via drag-and-drop method.