Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
HR Create Case throwing {{errorMessage}} - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • HR Create Case throwing {{errorMessage}}
KB0862330

HR Create Case throwing {{errorMessage}}


422 Views Last updated : Apr 8, 2024 public Copy Permalink
KB Summary by Now Assist

Issue

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. 



The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.