How to hide edit row option in a multirow variable set for specific catalog in RITM level
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024 08:06 PM
Hi Team,
I was able to create UI poilicy and set it ready only for entire variable but i want to hide the edit row icon itself for that particular catalog in RITM level. have used the below client script but still not working Can anyone suggest where i am going wrong.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024 08:32 PM
Hi @Sowmya ,
Try this script-
function onLoad() {
// Delay execution to ensure that all elements are loaded
setTimeout(function() {
disableEditRowIcon();
}, 2000);
}
function disableEditRowIcon() {
var fieldName = "vm_details_dev"; // Update with the correct field name
var field = g_form.getField(fieldName);
if (!field)
return; // Field not found, exit function
var icons = document.querySelectorAll('.wrapper-xs.fa.fa-pencil');
for (var i = 0; i < icons.length; i++) {
var icon = icons[i];
if (icon.getAttribute("title") == 'Edit Row') {
icon.style.display = 'none'; // Hide the icon
}
}
}
Mark my Answer Helpful or Accept Solution if it resolves your issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024 10:42 PM
@Ankur Bawiskar :Could you please help on this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2024 12:25 AM
this uses DOM manipulation.
Ensure Isolate Script is set as False for your client script for DOM to run
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader