Lifecycle stage and lifecycle status fields not getting populated with transform maps

Shanti7
Tera Contributor

Hi, 

we are implementing CMDB and decided to use the CSDM status fields such as Lifecycle stage and Lifecycle stage status fields. We are trying to load sample data using import sets and transform maps, but these fields are being set to blank despite they are defined in the transform maps. 

Here is the transform script and tried with both lifecycle stage names and sys_ids with no luck. 

 

Shanti7_0-1665724952422.png

Didn't create Lifecycle stage mappings as we are loading the CI data for the first time. 

Tried creating the field mappings too with no luck. 

 

Has anyone experienced the this issue before and knows how to fix it?

 

Thank you,

13 REPLIES 13

AnubhavRitolia
Mega Sage
Mega Sage

Hi @Shanti7 

 

Try to add below line after Line 7 and see if this resolves the issue:

target.update();

 

target.update();

 

 

Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.

Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023

Thank you @AnubhavRitolia for the response. 

I am using IRE API to import the data but not to Transform Map. 

To force the data source to use IRE API, we use the below onBefore transform script. 

---------------------------------------------------------
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());
}

----------------------------------------------------------------------

Any idea, how to fix it?

Rahul Priyadars
Giga Sage
Giga Sage

Just for troubleshooting - Are you able to create a record manually using same data values in CMDB?

Regards

rP

yes, able to manually select those fields. We have this issues only when we try populating them from import set and IRE API.