DOM Manipulation error with CustomEvent.fire
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2019 03:45 AM
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.
- Labels:
-
Platform and Cloud Security
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2019 12:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2019 01:48 AM
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
Abhishek Gardade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2020 02:08 AM
The post was helpful, but the implementation had lot of dependencies and it was not taken up on priority. Thanks for the response.