Using document.querySelector for Service Portal

Vividha Garg
Tera Expert

Is there any alternate to use document.querySelector for Service Portal and esc portal.

DOM Manipulation is not supported on Service Portal.

Can anyone please suggest alternate approach for it

 

Below is the code -

 

var requestedForName = g_form.getControl('onbehalf_name').id;
    var requestedForNameSelector = "a[id*=" + '"lookup.' + requestedForName + '"]';
    var requestedForNameRef = document.querySelector(requestedForNameSelector);
   
    if(requestedForNameRef.style.display != "none")
        requestedForNameRef.style.display = "none";
 
 
Thanks in advance
1 REPLY 1

MamathaKamatha
Tera Contributor

We are also facing same issue. Can anyone please suggest an alternate approach here without using DOM Manipulation.