Notifications

264 views

Description

Asset's Serial Number field is updated when Discovery runs because a Reconciliation Definition defined to prevent the field from updating is updated in the CI record.

Steps to Reproduce

  1. Either create a customized Reconciliation Definition or verify that one exists.

    https://<instance_name>.service-now.com/cmdb_reconciliation_definition_list.do.

  2. Run Quick Discovery on IP: <IP Address>.

    If the CI has just been created, the Serial Number of the CI will be "AAA9999A99". This will be synced to the Asset (attached to the CI) "Asset Example".

  3. Update the CI's Serial Number with the correct Serial Number "BBB9999B99".

    The Asset "Asset Example" will automatically sync the Serial Number entered on the CI.

  4. Run Quick Discovery on IP: <IP Address> again.

    The CI's Serial Number will not be updated due to the Reconciliation Definition (which is correct and expected). However, the Asset "Asset Example" Serial Number will be updated to "AAA9999A99".

 

Workaround

  1. Go to the script include named AssetAndCISynchronizer. <instance>/nav_to.do?uri=sys_script_include.do?sys_id=9ec37b411b012000e49bfbcd2c071380

  2. Replace lines 112 to 124 with the following logic:

    //***** START *******
    while(fieldGR.next()) {
    if(this._isSourceRecordMatching(source, fieldGR[mappingFieldName])) {
    srcField = fieldGR[sourceFieldName];
    destField = fieldGR[destinationFieldName];

    var e = source.getElement(srcField);
    if(e.changes()){
    if (!e.hasValue())
    destination.setValue(destField, '');
    else
    destination.setValue(destField, source.getValue(srcField));

    changes = changes + 1;
    }
    }
    }
    //***** END *******

     


Related Problem: PRB1250631

Seen In

There is no data to report.

Fixed In

London
Madrid

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2019-03-12 16:29:56
Published:2018-03-02