How to disable remove and add button on MRVS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2025 05:16 AM
Hello Everyone
I need to disable multirow variable set buttons(add and remove all) edit button should be visible on RITM. I tried this by using client scrip in my pdf which applies on RITM but it is working for catalog item view not on RITM.
Please suggest on this.
function onLoad() {
//Type appropriate comment here, and begin script below
setTimeout(function() {
disableButtons();
}, 2000);
}
//var n = new GlideRecord('sc_req_item');
//n.query();
//while (n.next()) {
function disableButtons() {
var mrvsid = '41226d96c32222104b501533e4013121';
this.document.getElementById(mrvsid + '_add_row').style.display = 'none';
var mrvs = g_form.getField("mrvs1"); //internal name of MRVS
mrvs.max_rows_size = 0;
var btn = this.document.getElementsByClassName("btn btn-default");
for (i = 0; i < btn.length; i++) {
if (btn[i].innerText == 'Remove All') {
btn[i].style.display = 'None';
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2025 07:00 AM
Hi Anubhav,
This code is not working for me I tried on load
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2025 03:09 AM
Hi @paynityam ,
Could you please post the client script code snippet of what you are trying.