DOM Manipulation error with CustomEvent.fire

Ram Mithra
Giga Contributor

During NewYork upgrade, Healthscan returned DOM Manipulation error for the following Catalog Client Script at line 8:

 

function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}

//Type appropriate comment here, and begin script below
var u_customerId = g_form.getValue("u_customer");
CustomEvent.fire('change_service_offering', newValue, u_customerId); //line 8
}

 

When ServiceNow provides the option to use CustomEvent.fire, why is it diagnosed as a DOM Manipulation issue? Please help.

3 REPLIES 3

Tony Chatfield1
Kilo Patron
Hi, the API documentation shows CustomEvent.fire as being a syntax specific to legacy chat, maybe CustomEvent.fireAll can be utilized?

AbhishekGardade
Giga Sage

Hello Ram,

I guess, CustomEvent.fire is not supported. You can try alternative option:

fireAll(String event, String qualifier)

Show the embedded-help content specified by the qualifier parameter in the right sidebar.

Before using the fireAll() method, you must have created the Embedded Help qualifier and help content.

You may try:

var qualifier = 'your-EH-qualifier';
CustomEvent.fireAll("embedded_help:load_embedded_help", qualifier);


Please mark as Correct Answer and Helpful, if applicable.
Thanks!
Abhishek Gardade
Hexaware Technologies

Thank you,
Abhishek Gardade

Ram Mithra
Giga Contributor

The post was helpful, but the implementation had lot of dependencies and it was not taken up on priority. Thanks for the response.