Notifications

98 views

 

Symptoms


DOM manipulation statements in onLoad client scripts fails after listV3 is enabled.

Release


All releases

Cause


ListV3 DOM is different than the listV2.

Resolution


DOM manipulation is not advised by serviceNow as it causes issues such as these.
 
Refer : AvoidDOMManipulation
 
We can wrap the DOM manipulation commands such as these in addAfterPageLoadedEvent in the onLoad client script as below.

function onLoad() {

     addAfterPageLoadedEvent(function(){
        document.getElementById('lookup.incident.u_business_service').style.display = "none";
     });

     //Your rest of the onload script
}

 

Article Information

Last Updated:2018-08-03 02:15:43
Published:2018-07-19