85 views

Description

When creating a New HR Case, the following error is seen.

Cause

1) After enabling debug and trying to create the case, the following error is seen in debug logs:
======
10:44:50.912 Evaluator: org.mozilla.javascript.EcmaError: Cannot find function setInitialCaseFields in object [object Object]. Caused by error in ftp://gsft_database_form/sys_ui_page.3433fb86eb533200a9e7e26ac106fef2.html.28 at line 15 12: var taskCreateTable = evConfig.taskCreateTable; 13: var taskCreateRecord = new GlideRecord(evConfig.taskCreateTable); 14: taskCreateRecord.initialize(); ==> 15: evConfig.setInitialCaseFields(taskCreateRecord); 16: var taskFields = {}; 17: for (var key in evConfig.taskFields) 18: taskFields[key] = evConfig.getFieldObjects(taskCreateRecord, evConfig.taskFields[key], true);
======


2) When the Create Case link from the menu it clicked, it calls the UI Page (case_Creation):
https://instancename.service-now.com/nav_to.do?uri=sys_ui_page.do?sys_id=3433fb86eb533200a9e7e26ac106fef2

Which then calls script includes (hr_CaseCreation), checked the script includes(hr_CaseCreation) and the function (setInitialCaseFields) seems to be missing as the file has been customised:
https://instancename.service-now.com/nav_to.do?uri=sys_script_include.do?sys_id=687d7d8deb6f3200a9e7e26ac106fee0

Resolution



Revert the script and rollback to OOB. 


Article Information

Last Updated:2020-10-22 22:01:45
Published:2020-10-23