- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2020 07:48 PM
Hello All,
I have a requiremnet to remove the attachment icon from the service catalog UI.
In portal we are able to remove it by checking the field on the service catalog "remove Attachment".
But we are not able to figure it out on the UI side to remove the attchment icon.
Pleas let us know your thoughts.
Thanks
Solved! Go to Solution.
- Labels:
-
Request Management
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2020 08:24 PM
No you cannot remove it from native directly.
You will require onLoad catalog client script and use DOM for this
It is not recommended to use DOM as best practice
If you still require then use below approach
1) Create catalog client script which applies only on Desktop
2) Ensure Isolate Script field is set to false. This field is not on form but from list you can make it false
Sample script below
function onLoad(){
document.getElementById('sc_attachment_button').style.display = 'none';
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2020 08:24 PM
No you cannot remove it from native directly.
You will require onLoad catalog client script and use DOM for this
It is not recommended to use DOM as best practice
If you still require then use below approach
1) Create catalog client script which applies only on Desktop
2) Ensure Isolate Script field is set to false. This field is not on form but from list you can make it false
Sample script below
function onLoad(){
document.getElementById('sc_attachment_button').style.display = 'none';
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-10-2023 04:21 AM
Hi Ankur,
is it okay if we use DOM manipulation, i see articles stating DOM manipulation is not something that we should resort to for solutions in serviceNow. Please let me know your thoughts.
Regards,
Pavan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-10-2023 08:34 PM
yes it's not recommended as per best practices.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-18-2024 10:56 PM
It is no longer this complicated i guess.
Simply open your catalog item under 'Maintain Item' module & under "Portal Settings', check 'Hide Attachment' -
It works 100% so shouldn't be an issue.
Do mark this answer as helpful or accepted if it helps. Thanks