How to hide edit row option in a multirow variable set for specific catalog in RITM level

Sowmya
Tera Contributor

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.

function onLoad() {
    //MRVS is loaded after the catalog item is loaded. Hence setting a delay of 2 secs.
    setTimeout(function() {
        disableButtons();
    }, 2000);
}

function disableButtons() {
    var my_var = g_form.getField("vm_details_dev");//use your variable set name here
    var icon = this.document.getElementsByClassName("wrapper-xs fa fa-pencil");
    for (i = 0; i < icon.length; i++) {
        if(icon[i].getAttribute("title") == 'Edit Row') {
            icon[i].style.display='None';
        }
    }  
    //To hide Edit icon, then use the class name as fa-pencil instead of fa-close
}
1 REPLY 1