Unable to update the record via Import set, the record being ignored

Rashmika BS
Tera Guru

We have integrated with a third part tool where the query push the data to Servicenow. The query has been mapped with import set table. The data comes to to import set table and via transform map, it pushes the data to target table with serial number as coalescing field. This was creating duplicates and we have applied onbefore script with the below but this is just ignoring the records and not updating them or inserting. Please advise. @CMDB 

 

(function runTransformScript(source, map, log, target) {
// Call CMDB API to do Identification and Reconciliation of current row
var cmdbUtil = new CMDBTransformUtil();
cmdbUtil.identifyAndReconcile(source, map, log);
ignore = true;

if (cmdbUtil.hasError()) {
        var errorMessage = cmdbUtil.getError();
        log.error(errorMessage);
} else {
        log.info('IE Output Payload: ' + cmdbUtil.getOutputPayload());
        log.info('Imported CI: ' + cmdbUtil.getOutputRecordSysId());
}

})(source, map, log, target);
1 REPLY 1

dhanu3
Kilo Sage

@Rashmika BS please use ignore = true inside your if statement.