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.
Inbound Action triggered by new email fails to create record for script runtime error - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Inbound Action triggered by new email fails to create record for script runtime error
KB0746934

Inbound Action triggered by new email fails to create record for script runtime error


9622 Views Last updated : May 2, 2023 public Copy Permalink English (Original)
  • English (Original)
  • Japanese
KB Summary by Now Assist

Issue

a) A new email arrived to the instance, however no new incident was created.  

The email record's log section shows that the Inbound action was fired but no record was created or updated:


Skipping 'Create Incident', did not create or update Incident.
Stop processing detected after executing script: Create Incident.


b) You browse the nodes log files at the time of the inbound action, and there is evidence that the inbound action script finish with an error:

*** WARNING ***Evaluator: org.mozilla.javascript.EcmaError: "mylookup" is not defined. 
Caused by error in sysevent_in_email_action.aff0ada71c540100db369016842fd3ab.script at line 25

Release

Any supported release

Cause

You will get this type of error when somehow the script executed by the inbound action returns a runtime error.

In the particular case showed here the inbound action script was set to call a script includes, but the call did not include the API namespace causing a script execution failure and no incident was created or updated. 

Inside the inbound action code, there was a call to a script includes named 'mylookup' and method getData() which was not found at execution time since was not called including the namespace. 


This is how it was called:

 var myvalue = mylookup.getData(email.subject); 


This is how it should be called:

var myvalue = <API_namespace_here>.mylookup.getData(email.subject); 


If there are many different application scopes in the instance where this inbound action runs, the script namespace is required to uniquely identify the object being called.


Resolution

Include the API Namespace in the script call in all inbound actions that calls script includes. The issue was resolved after include the API Namespace in the Script includes call.



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.