JavaScript error in your browser console in portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2023 12:55 AM
Hi Everyone,
I am getting error in portal JavaScript error in your browser console while its working fine in native view
Client Script:onSubmit
function onSubmit() {
if (g_form.getValue('u_report_obtained') == 0 && g_form.getValue('u_q1') == 'yes') //report obtained= false and and q1 is yes {
var attachments = document.getElementById('header_attachment_list_label'); if (attachments.style.visibility == 'hidden' || attachments.style.display == 'none') {
g_form.addErrorMessage("Please attach the latest third-party audit report and respond to the attestation questions below.");
} else { return false; } } }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2023 01:50 AM
Hi @Ankur Bawiskar sir Thank you but its not a catalog item, its a form in GRC. The script is not working for my requirement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2023 01:57 AM
then you can use before update/insert BR and stop form submission.
OR
you can use onSubmit + GlideAjax
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader