- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2022 07:34 AM
Hi, I'm receiving the below error when I try to submit the client script. Please assist. See this error on all the types of client 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);
}
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-01-2022 03:00 AM
Hi,
seems you are trying to call that function but it's not defined anywhere?
Are you having any UI script which holds this function -> validateFunctionDeclaration
Did you search that?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-01-2022 03:09 AM
Hi
Please clarify whether the undeclared function "validateFunctionDeclaration" is in an onLoad Client Script of any UI Script?
function onSubmit() {
var functionName = g_form.getValue("type");
if (functionName == "")
return true;
//"validateFunctionDeclaration" is not declared any where
return validateFunctionDeclaration("script".functionName);
}
You are getting the error because of the undeclared function "validateFunctionDeclaration".
Please mark my answer as correct if this solves your issues!
If it helped you in any way then please mark helpful!
Thanks and regards,
Kartik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-30-2025 04:06 AM
I’m facing the same issue. Were you able to resolve it?