"There is javascript error in your browser console" - Error message appears in service portal form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
13 hours ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
13 hours ago
There is an issue with some client script running on the form.
share the code of that client script, it should have some issue.
Sometime if script include return empty value to client script, this error appears, but reasons could be others as well.
Also you can put your client script code in try and catch block, it will not show the error but code need to be checked to fix this.
Please mark the answer correct/helpful accordingly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12 hours ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12 hours ago
@BhagyasriCh Errors are not always exact, its either a client script or UI Policy run script.
Have seen this issue multiple times, so easy way to troubleshoot is deactivate all client script/ ui policies and then reload the form and see if issue still exists.
Also see if you are using any custom variable to call ui page/ macro or widget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12 hours ago
Hi @BhagyasriCh ,
The error message "There is a JavaScript error in your browser console" and the attached console logs indicate a ReferenceError: embeddedWidgetOptions is not defined. This suggests that the JavaScript code is trying to access a variable or object (embeddedWidgetOptions) that hasn't been defined or initialized, likely within a client script or widget on the service portal.
From the logs, the issue occurs during the execution of a client script (g_validation_script_field_count), and the error is triggered at a point where embeddedWidgetOptions is expected but missing. This could be due to:
A missing or incorrect initialization of the embeddedWidgetOptions object in the script.
A dependency or variable not being loaded properly before the script runs.
An issue with the widget or catalog item configuration on the service portal.
To resolve this:
Check the client script associated with the "Carrier Request" form or widget for any references to embeddedWidgetOptions.
Ensure that embeddedWidgetOptions is properly defined and initialized before it is used (e.g., as a global variable or passed to the script).
Verify that all required scripts and dependencies are included and loaded correctly in the service portal.
Inspect the widget or catalog item (sc_catalog_item_kp.js:515:32) mentioned in the stack trace to ensure it aligns with the form's configuration.