Hide x in mrvs

SS1510
Tera Contributor

I want to hide 'X' in MRVS on on Load , the script available on community is not working .Does anyone have idea about it.

11 REPLIES 11

@SS1510 

you should write normal client script on sc_req_item table with Isolate Script = False

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Ankur Bawiskar  , How does it work on sc_req_item table, I want to hide on Catalog item

@SS1510 

so while raising you don't want them to delete the rows using cross icon?

but what if user added something by mistake and want to remove

This is not a valid business requirement in that case.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

I applied on sc_req_item table , then also x icon is not hiding on RITM

@SS1510 

this worked for me in onLoad client script on sc_req_item Table

Ensure "Isolate Script" = False for your client script

If this field is not on form then from list make it false

function onLoad() {
    //Type appropriate comment here, and begin script below
    setTimeout(function() {
        var items = document.getElementsByClassName('btn icon-cross btn-sm multi-row-delete-row');
        for (var i = 0; i < items.length; i++)
            items[i].style.display = 'none';
    }, 3000);

}

AnkurBawiskar_0-1750755155975.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader