- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2019 01:20 PM
I created a 'Service catalog content item' to display some static text, to be available on both CMS and Portal views.we are on Madrid version. I want to hide 'Add Attachments' on portal view for this item and made checkbox 'Hide Attachment (no_attachment_v2=true)' but still 'Add Attachments' is getting displayed on portal view.
Please help me how to solve this.
Note : Hide Attachment is working fine for Service catalog items but not for Content items
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-14-2019 01:45 PM
This is the known issue with content items on portal in Madrid release. It is fixed in Newyork release.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2019 01:46 PM
Hi Snigdha,
Please refer below article by Mark, i am very sure this will help you
Pre-Madrid, we could script this thru Catalog Client Scripts. Another option would be to customize the SC Catalog Item widget. Both not great, the Catalog Client Scripts are needed on every Catalog Item you wish to have this functionality on, customizing the SC Catalog Item would mean you would miss updates from patches/upgrades.
For if you are not yet on Madrid and do want to hide attachments or make attachments mandatory. Here is some example scripting.
Hide attachment - onLoad Catalog Client Script
function onLoad() {
var attachmentButton = top.document.getElementsByTagName('sp-attachment-button');
attachmentButton[0].parentNode.hidden = true;
}
Mandatory attachment - onSubmit Catalog Client Script
function onSubmit() {
if(this.document.getElementsByClassName('get-attachment').length == 0) {
g_form.addErrorMessage(getMessage('mandatory_attachment'));
return false;
}
}
With Madrid, some cool and super easy checkboxes are introduced! Checkboxes which can be configured for Catalog Items individually and making scripts like above obsolete.
Madrid checkboxes
And that's actually it! So easy to apply.
Do mark it correct answer and helpful in response if this resolves your query
Regards,
Ajay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2019 09:27 AM
Hi Ajay,
Thanks for referring to this article, but i already checked this article.
As mentioned in question earlier, i made "Hide Attachement" to true but still 'Add attachment' is displayed on Content items in portal. This is working for Service catalog items but not on Content items.
I tries to modify portal widget also but no luck. I f some one has ideas on how to modify portal widget to correct this please help.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2019 09:46 AM
Hi there,
Have you checked that you are using the out-of-the-box "SC Catalog Item" widget?
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
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
‎10-04-2019 09:53 AM
Just tested with Content Item like below:
On Service Portal (with SC Catalog Item widget), is shown without Attachment:
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field