- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2022 06:02 AM
Hello,
I've a requirement to remove the Attachment paper clip for the catalog items after submitting the item i.e, on the submit page of the Portal, for which we've opted 'Hide Attachment' as 'True' in the Portal Settings. I've tried multiple ways by modifying the 'Ticket Attachments' widget on the Service Portal. But nothing worked out.
Please help me with the procedure.
Thanks in advance
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2022 02:56 AM
Ok then modify to check the catalog item here,
1. create a property with the sysid of the catalog items.
2. check if the ritm is from the catalog item.
3. block/allow the attachment
this should be added above the data.canAttach line.
var currentRecord = $sp.getRecord(); // get the current record
var catitemrecord = currentRecord.cat_item; // check the catalog item
// the property should contain the sysid of the catalog item
var restricAttachment = (catitemrecord.indexOf(gs.getProperty('name of prop')) > -1)
// add the line "&& !restricAttachment" this will not allow attachment for the sysid mentioned in the property
data.canAttach = gs.hasRole(gs.getProperty("glide.attachment.role")) && GlideTableDescriptor.get(data.table).getED().getAttribute("no_attachment") != "true" && !restricAttachment;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2022 06:07 AM
Press Cntrl and Right click on the widget --> Select Widget in Editor option ---> remove that section from the HTML where attachment is being used
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2022 02:17 AM
Hi Suvro,
Thanks for your answer, but, the attachment functionality has to be removed only for two catalog items only for the remaining catalog items and incidents it should work as is.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2022 06:14 AM
Hi,
Is it only for catalog items - so for incidents, the attachment should still be shown? Or do you wish to remove it from all tickets?
Best regards,
Sebastian Laursen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2022 02:16 AM
Hello Sebastian,
Thanks for your answer, but, the attachment functionality has to be removed only for two catalog items only for the remaining catalog items and incidents it should work as is.
Thanks