
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2021 10:02 PM
Hi Team,
I would like to disable attachment icon(paper clip icon) in both native view as well as in portal page for "report Vaccination" record producer. The record producer is on scoped application. Please help me here to achieve this.
Below is my catalog client script ,
Type : onload
UI type : All
script :
function onLoad() {
document.getElementById("sc_attachment_button").hide();
}
Any input on this would be much appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2021 02:11 AM
Till the you can use this script. It would work in portal and native both
function onLoad() {
//Type appropriate comment here, and begin script below
if(window == null){
var z = this.document.getElementsByClassName("panel-button sp-attachment-add btn btn-link");
z[0].style.display = 'none';
var k = this.document.getElementsByClassName("file-upload-input");
k[0].style.display = 'none';
var aTags = this.document.getElementsByTagName("span");
var searchText = "Add attachments";
var found;
for (var i = 0; i < aTags.length; i++) {
if (aTags[i].textContent == searchText) {
aTags[i].style.display = 'none';
break;
}
}
}
else{
document.getElementById("sc_attachment_button").hide();
}
}
Portal Output:
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
01-17-2021 11:46 PM
Hi,
It should be available and should be active=true in dictionary for the record producer table
Please enable it as it would be required for other record producer as well.
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
01-18-2021 12:39 AM
it is available in the table level and for now I made it active but still I couldn't access it in list layout/form layout
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2021 12:42 AM
Hi,
So you made that field as active=true in dictionary and still not able to view in list layout.
Please try to logout and login again and share screenshots of the dictionary entry and the form layout and list layout after login
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
01-18-2021 01:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2021 02:01 AM
That field should be active=true.
Even after making it active=true if it is still now showing please raise HI ticket with ServiceNow.
They should tell you what's the issue.
As I said you will have to use some DOM which is not recommended
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader