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.
Event generates error to EventRecord: getEventTarget() called with invalid record reference - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • Event generates error to EventRecord: getEventTarget() called with invalid record reference
KB0522706

Event generates error to EventRecord: getEventTarget() called with invalid record reference


8031 Views Last updated : Jul 17, 2025 public Copy Permalink
KB Summary by Now Assist

Description

An event may generate an error traced in the log with the originating reason, but the displayed message seems incorrect:

2011-11-17 07:15:31 (365) worker.4 worker.4 Connected
2011-11-17 07:15:31 (374) worker.4 worker.4 Processing 0 emails
2011-11-17 07:15:31 (374) worker.4 worker.4 Processing email total: 0, new: 0, deleted: 0, unread: 0
2011-11-17 07:15:31 (397) worker.0 worker.0 WARNING *** WARNING *** EventRecord: getEventTarget() called with invalid record reference: sc_request.d63e4f07299a148044d78d67c8138c5e for event: email_equipment_return, could have been deleted
2011-11-17 07:15:31 (423) worker.4 worker.4 Processed 0 emails

The record is there and is not deleted. There are events that do not have a state of "error" that call to the same record type in the same way.

Steps to Reproduce

  • View the events for errors and get the sys_id of the record in the URI field of the event
  • Go in to the daily log for the same day of the error and search by the sys_id
  • Note the output log which states a record does not exist, when it actually does

Workaround

This is expected behaviour caused by a temporary impersonation issue. If an impersonation is initiated but then not reversed back to the original impersonator, the user will be stuck in a bad state of impersonation. This can be observed by looking at the user that updated the event. If this is not system and is instead a user that does not have access to the instance record on the event, the event will output this error when processed. However, there is no platform code fix necessary.

In some situations, there might be a custom Business Rule that runs before - Insert and subsequently fires an event. This might cause a condition where the event is processed before that record is created, leading to the error.

In such event, it is recommended to implement the eventQueueScheduled() method to fire the event a minute into the future so that we can ensure the record is created first and the event is successfully processed.


Related Problem: PRB565663

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.