- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2022 06:18 PM
I would like to disable the attachment in a form view of a record in Service Portal.
I'm using Data Table from Instance Definition widget.
I have already created a UI policy for this, but it seems like it only applies to the instance/back-end.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2022 12:56 AM
Can you clone the widget in global scope and check if the issue still persists?
Also,
There is another way to hide attachments from Service Portal using DOM manipulation but it is not best practice to use DOM manipulation. You can try below code in OnLoad Client script
Table - sc_request
UI Type - Mobile/Service Portal
Type - onLoad
Isolate Script - Set it to false/Uncheck
function onLoad() {
var attachmentButton = top.document.getElementsByTagName('sp-attachment-button');
attachmentButton[0].parentNode.hidden = true;
top.document.getElementsByClassName('sp-attachment-manager')[0].style.display = 'none';
}
If you are doing it through client script, you don't need to clone any widget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2022 11:32 PM
Press Ctrl+ Right Click on the form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2022 11:51 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2022 12:49 AM
Hi,
You can create a new page and clone OOB Form widget. Then link Data Table Instance widget to the new page.
1. Navigate to Service Portal-> Widgets. Search for Form widget and clone it.
Go to the CSS of cloned Form widget and add display:none; for below class and save it
2. Navigate to Service Portal ->Pages. Create a new page and add Cloned Form widget
3. Now Ctrl+Right click on Data Table Instance widget and click Instance Options and select your new page in Link to this page and save it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2022 01:15 AM
I'm not using a page for my form view. It's just automatically redirects me in that form whenever I click the record in the list view of my data table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2022 04:52 PM