How to Hide the add attachments button on a request item in the service portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2017 07:03 AM
Hi All
I want to hide the "add attachments" button on one of my service portal request items.
I've already hidden the submit button using the client controller in a widget using the following script.
function() {
/* widget controller */
var c = this;
hideButtons();
function hideButtons(){
$('button[name="submit"]').hide();
}
}
is there a way to also hide the add attachment button in the same way?
- Labels:
-
Service Portal Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2017 07:14 AM
Use onload client script to disble attchement as below
g_form.disableAttachments();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2017 07:19 AM
Hi
would that disable attachments for all items? or just the specific item?
i want to disable attachments for a specific item
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2017 07:22 AM
Then you can add an if condition for the sys_id of that catalog item.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2017 07:37 AM
Hi
The script has worked as far as attachments are disabled but the button is still visible.
however when i view the item through the service portal the "Add attachments" button is still visible and functioning