- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-16-2020 02:27 AM
my Requirement is to disable the pencil icon i.e Edit icon in a multi-row variable set for a certain record?
Any solution would be welcome.
Thanks in advance
Solved! Go to Solution.
- Labels:
-
Service Portal Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-16-2020 04:47 AM
Hello Arushi,
Good to know that my articled helped you. If you want to hide for specific icon, there is no directly way.
In your rows , you can do a check for the text in the 1st column (after pencil) and if that matches you can hide it. Here is sample code for that.
icon = this.document.getElementsByClassName("wrapper-xs fa fa-pencil");
for (i = 0; i < icon.length; i++) {
if (icon[i].getAttribute("title") == 'Edit Row') {
if (icon[i].parentNode.nextElementSibling.innerText == 'YOUR TEXT') {
icon[i].style.display = 'None';
}
}
}
In the code, replace it with your text and then check. Then it will disable the pencil icon only for that row having that text.
Mark the comment as a correct answer and helpful once worked.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-16-2020 02:40 AM
HI Aarushi,
Check this article from Asif MRVS
Please Mark as ✅ Correct if this solves your issue and also mark ???? Helpful if it helps resolve your problem.
Thanks,
Saji

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-16-2020 02:42 AM
hi,
Check this article where i have provided steps on how you can disable the pencil icon.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-16-2020 03:37 AM
Hi sir,
Your article is really very helpful but I want to disable the pencil icon for a certain record is that possible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-16-2020 03:44 AM
Hi Aarushi,
So are you saying you are having 2 rows in MRVS then you want to hide it only for 1 row?
please explain in detail
the script shared in my earlier comment should hide it directly
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader