- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2020 04:07 PM
Need hide "Add attachments" button for a particular item, not on all widgets, in Service Portal. How can it be done?
Solved! Go to Solution.
- Labels:
-
Service Portal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2020 10:03 PM
Hi there,
Since Madrid, there's out-of-the-box functionality for this: a checkbox on the Catalog Item to hide the attachment.
See this article for detailed explanation.
Service Portal Catalog Items: Hide Attachment / Mandatory Attachment [Madrid]
Madrid checkboxes
Be aware:
For some this doesn't work. Why? Because they cloned the SC Catalog Item widget or are using an older widget. If you cloned the widget, the improvements made by ServiceNow are obviously not in your cloned versin.
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2020 05:19 PM
Clone SC Catalog Item and add to the page.
On clone widget in client script you will see something like. Make sure to add sys_id of catalog item you want to exclude
c.showAttachments = function() {
return !$scope.submitted &&
!c.data.sc_cat_item.no_attachments &&
c.data.sc_cat_item.sys_class_name !== "std_change_record_producer";
};
change it to
c.showAttachments = function() {
if (c.data.sc_cat_item.sys_id == 'SYS id of catalog item') {
return false;
} else {
return !$scope.submitted &&
!c.data.sc_cat_item.no_attachments &&
c.data.sc_cat_item.sys_class_name !== "std_change_record_producer";
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2024 01:05 PM
I found this helpful. This code was missing from my cloned SC Catalog Item from 2020. I found adding this code into my cloned version added the functionality of "Hide Attachment" on Service Portal to work OOB.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2020 05:23 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2020 09:58 PM
Hi Amy Liu
Please follow the above link.
Please Mark Correct and Helpful
Thanks and Regards
Gaurav Shirsat