My code works in native UI but not on SP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2023 04:38 AM
I have created a code For removing( Add/Remove) and Edit icon fron Multi-Row Variable Set .
It's working in native Ui but not on SP.
I'm attaching the code and screenshots below for reference.
setTimeout(function() {
//hide the add/remove table
var z = this.document.getElementsByClassName("btn btn-sm icon-edit");
var k;
for (k = 0; k < z.length; k++) {
z[k].style.display = 'none';
}
}, 1500);
var y = this.document.getElementsByClassName("sc-table-variable-buttons");
var j;
for (j = 0; j < y.length; j++) {
y[j].style.display = 'none';
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2023 06:18 AM
if you remove add/remove then how user will update MRVS?
Why not make the MRVS readonly then it will hide the icons as well?
Check this link and response from mattcox
Disable buttons in MultiRow Variable Set
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2023 07:03 AM
This MRVS is autopopulated from a custom table.
the req is user shoul be only able to select or remove data .not edit or add.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2023 07:39 AM
then check the link I mentioned.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2023 07:42 AM
I have gone throught it but it's not wrking.
My script is working in nativa ui But not inSP.