ServiceNOW Transform map Target system Date Fields are not matching the source Sys Date Fields.

Community Alums
Not applicable

Hi All

I have an issue with the Transform map Target Table Date Fields.

I created the transform map to sync the Group tables data from Higher Environment to Lower Environment

I used the Data source as XML for the Data source and created the Transform map.

Whenever I run the Transform map. All the data that I want to move from Higher Environment to Lower Environment is flowing without any issue to the Source Table of the Transform map the Date Fields "sys_Created_on" & "sys_updated_on" also match the Data source Date Fields.

But The Target Table "Created" and "Updated" Date fields are not matching with the Source Table Date Fields.

The Target table "Created" and "Update" fields are showing the current transform map run dates.

 

How can I populate the same date values from the source table to target table without changes.

 

Thanks

DP

2 REPLIES 2

Vika
Tera Contributor

Hello @Community Alums ,

 

Process speaking, I would not recommend you to rewrite those two fields, since those are the current instance system fields which will show you when an action took place in this instance. Furthermore, "Updated" will show you the time of the latest update in a different instance, which may change even the moment you upload the data, or it will be changed shortly after your upload by a Group Manager for example. So even less reasons to store it.

As a workaround you can put this data to a Description field. 

 

Technically speaking, I believe the root cause lies under two write ACLs with the below sys_ids:

2cb6d9990a000704006de599a16c1119
2cb2fb070a0007040000d6d4d11b8bb3

Community Alums
Not applicable

Hi Vika

Thank for the Reply on my Query.

My Issue Resolved by adding the below code.  the Code was taken from the below URL.

Solved: how can I load created and created by fields from ... - ServiceNow Community

When you create a Transform Map, uncheck 'Run Business Rules'

- Click run script and try the following script:

(function transformRow(source, target, map, log, isUpdate) { target.autoSysFields(false); target.setWorkflow(false); })(source, target, map, log, action==="update");

 

Thanks

Praveen