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.
CMDBTransformUtil needs to ignore sys_id=-1 values being passed to it in the map for CMDB Import Transform Maps - No record with sys_id [-1] exist in table - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • CMDBTransformUtil needs to ignore sys_id=-1 values being passed to it in the map for CMDB Import Transform Maps - No record with sys_id [-1] exist in table
KB0743680

CMDBTransformUtil needs to ignore sys_id=-1 values being passed to it in the map for CMDB Import Transform Maps - No record with sys_id [-1] exist in table


2485 Views Last updated : Apr 8, 2025 public Copy Permalink
KB Summary by Now Assist

Description

CMDBTransformUtil will pass an invalid sys_id value of "-1" through to the Identification engine in the payload, it it is included in the map of the transform.
Those values need to be ignored, or the transform will fail with error: createOrUpdateCI failed, and 'No record with sys_id [-1] exist in table'

This would be a common situation for an existing CMDB Import Transform Map being enhanced for the best practice of using the Identification and Reconciliation engine for the insert or update.

Steps to Reproduce

This example uses the existing out-of-box SCCM 2016 plugin, as an example of a Transform that isn't using the Identification and Reconciliation engine for the insert or update yet.

  1. Install the SCCM 2016 Integration plugin
  2. Add a onBefore script to the 'SCCM 2016 Computer Identity' Transform Map to make it use CMDBTransformUtil for the insert/update instead, using the example in the docs:
    Apply CI Identification and Reconciliation to Import Sets 
  3. Use REST API Explorer, and the Import Set API, to run the following payload for the SCCM 2016 Computer Identity :
    {
    "u_manufacturer": "Microsoft Corporation",
    "u_model": "Virtual Machine",
    "u_biosserialnumber": "PRB1331033-TEST",
    "u_name": "PRB1331033-TEST"
    }
  4. Look at the Transform History and the insert will not have happened, with error: createOrUpdateCI failed.
    Information:
    Identification and Reconciliation Result: {"items":[{"sysId":"Unknown","identifierEntrySysId":"Unknown","errors":[{"error":"INVALID_INPUT_DATA","message":"Found invalid sys_id in payload. No record with sys_id [-1] exist in table [cmdb_ci_computer] or is a duplicate record with [discovery_source] field marked as Duplicate"}],"identificationAttempts":[]}],"relations":[],"logContextId":"d96fa79bdb44730073a98324399619ab"}

Workaround

  1. Customise the "CMDBTransformUtil" Script Include getTransformValues function to ignore this invalid sys_id:

lines 117-118. Change from:

} else 
values[targetField] = targetValue;

Change to:

} else if (targetField !== 'sys_id' || targetValue !== '-1')
values[targetField] = targetValue;

Related Problem: PRB1331033

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.