Catalog client script for making a variable bold is working on DEV but not on PROD

Nishitha Yedala
Tera Contributor
I have the below catalog client script, It is working fine on DEV instance but not PROD . 
The isolate script is also set to false
 
Unable to find the reason.




function
onLoad(){

    setTimeout(function(){
       

            // portal
            var aTags = this.document.getElementsByClassName("ng-binding");
            var searchText = "Please enter the S1 Site name manually if it is not available in the list above (e.g. 099 - Test Site):";
            var found;

            for (var i = 0; i < aTags.length; i++) {
                if (aTags[i].textContent.toString() == searchText) {
                    aTags[i].style.fontWeight = 'bold';
                    aTags[i].style.fontSize = '15px';
                    aTags[i].style.paddingLeft = '6px';
                    break;
                }
            }
       

    }, 1000);

}  


7 REPLIES 7

Samaksh Wani
Giga Sage
Giga Sage

Hi @Nishitha Yedala ,

 

Could you please check the version of the Catalog Client Script in PROD and compare it with the one in DEV?

 

If both versions are the same and the issue still persists, please go ahead and raise a HI Case with the ServiceNow Support Team to help reproduce and investigate the issue further.

 

Pls mark my solution as accept and thumbs up if you find it helpful. It will help other users on community to find helpful response.

 

Regards,

Samaksh Wani

Musab Rasheed
Tera Sage
Tera Sage

Your method is not good, Kindly refer below for workaround

https://www.servicenow.com/community/itsm-forum/how-to-make-label-variable-type-to-look-bold-in-serv...

Please hit like and mark my response as correct if that helps
Regards,
Musab

Thank you, I tried it but nort working 

Ankur Bawiskar
Tera Patron
Tera Patron

@Nishitha Yedala 

since you are using DOM manipulation the HTML element ID in PROD might be different.

did you check that by inspecting the page?

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