Hide Preview icon on related list
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2024 04:01 AM
I want to hide preview option in the related list. Something like below in scoped application table.
I tried some UI scripts in the community, didn't find the exact solution. Any help would be appreciated.
Thank you
11 REPLIES 11

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2024 06:10 PM - edited 08-20-2024 06:17 PM
Its working for me.
Can you check this
- When it comes to the Service table, it may be application service /technical service / business service/offering tables if you have CSDM. So in your condition, use something like this as mentioned in the below script.
- Also, please make sure to use ".do" in your condition, otherwise, it applies to List view of the service table and people will not be able to personalize list view.
(function() {
addAfterPageLoadedEvent(function() {
if ((window.location.href.indexOf('cmdb_ci_service.do') != -1 || window.location.href.indexOf('cmdb_ci_service_auto.do') != -1)) { //Add the remaining classes as well
var table = document.getElementById("cmdb_ci_service.kb_knowledge.cmdb_ci_table"); // check if the element id is the same for application service/technical service etc.,
for (var i = 0; i < table.rows.length; i++) {
table.rows[i].cells[1].style.display = "none";
}
}
});
})();
Thanks,
Narsing
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2024 07:00 AM
Adding .do on the table name worked. Thank you!!
if ((window.location.href.indexOf('cmdb_ci_service.do')