how to get the sys_id's to import in a transform map?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2022 07:49 PM
I have records in a table in a scoped application that I would like to copy to dev on a regular basis for testing. Currently, I do this manually using export XML/ import XML, which works great and keeps the sys_id's the same on both instances. Because this is done regularly, I would like to schedule it. I have tried to use a Data Source --> Transform Map. In the transform map I map the sys_id from the import set table to the SysID in the target table as per this documentation page. However, when i run the transform, the records in the target table are assigned new sys_id's. Is there something else I need to do?
This question mentions section 3.4 of a wiki article but this may be for prior versions.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2022 08:28 PM
Hi,
Do you have sys_id's in the Excel sheet which you are uploading ?
You have selected the sys_id column of import set table and not the one which contains sys_id's provided by you.
If you have sys_id column in your excel sheet then the column must be created with name u_sysid or u_sys_id.
Thanks,
Anil Lande
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2022 05:50 PM
Thanks Anil. I double checked, the sys_id selected in the transform map is u_sys_id which is the sys_id from the table in the production instance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2023 04:49 AM
Probably a bit late now but I had this same question and now have the answer. You can use ".setNewGuidValue" to achieve this. So what I did was to use an on before transform script which contains below code
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
if (action == "insert"){
target.setNewGuidValue(source.u_sys_id);
}
})(source, map, log, target);