- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2016 07:30 AM
Hi all,
Im in the process of trying to import company details. However the source sys_id seems to match the target sys_id but when i check in the "companies" section, it seems to make up another sys_id.
I have the following script:
var name = source.u_name.toString();
log.info("MP: name = " + name.toLowerCase());
if(name.toLowerCase() == "evides"){
ignore = false;
log.info("MP: Imported " + name);
log.info("MP: before source.u_sys_id = " + source.u_sys_id + " target.sys_id = " + target.sys_id);
if (action == "insert"){target.setNewGuidValue(source.u_sys_id);}
log.info("MP: after source.u_sys_id = " + source.u_sys_id + " target.sys_id = " + target.sys_id);
}
else{
ignore = true;
log.info("MP: Ignored " + name);
}
Where am i going wrong?
Thanks in advance for your help!
Menosshan
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2016 01:16 AM
Hi Menosshan,
Is it possible the sys_id's exist elsewhere on the system? I'd have thought it best not to set a sys_id of a record unless you're importing XML records between instances
Simon

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2016 01:37 AM
As @simon westwoord mentioned above. It is recommended to use XML in case you want to retain the sys ids (generally in case of sub production to production).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2016 01:26 AM
Hello,
I guess target.sys_id will give you the sys id of target table and not record.