Error in client scripting course - onSubmit script error: ReferenceError: validateFunctionDeclaration is not defined
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2021 01:33 PM
Hi, I'm doing the paris scripting course https://developer.servicenow.com/dev.do#!/learn/courses/paris/app_store_learnv2_scripting_paris_scri... and I'm on the client scripting module learning about the onLoad, onSubmit and other different functions, but I cannot activate the example scripts that I got from the needit application, I get the following error when I update or save any script:
onSubmit script error: ReferenceError: validateFunctionDeclaration is not defined:
function onSubmit() {
var functionName = g_form.getValue("type");
if (functionName == "")
return true;
return validateFunctionDeclaration("script", functionName);
}
But I only have 3 scripts
and the onSubmit script only has this code
What is going on? Am I doing something wrong?
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2021 03:28 PM
Hi, don't disable this SNC script, it is validating client scripts.
Disable your custom scripts and any OOB script you have modified, this should resolve the issue?
Then enable them one at a time to work out where the issue is.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2021 03:35 PM
I read this response too late and deleted the Service Now script, is there any way I can recover it :(?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2025 11:57 PM
hi @Daniel R1 what was the solution for the above issue menyioned as i am also having similar issue after upgrade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2025 04:05 AM
I’m facing the same issue. Were you able to resolve it?