- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello,
I was trying to do transform map of work type records from old instance(A) to the new instance (B). We need sysIDs to be copied to the new instance. Below is the onBefore transform script. However, this isn't working. Anything wrong with my code? Any help or direction to resolve this would be greatly appreciated.
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
if (action == "insert") {target.setNewGuidValue(source.sys_id); }
})(source, map, log, target);
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello @SathiskumarD , I'll suggest to create coalesce on the sys_id so that no conflict with the sys_id as you are trying to import something that is supposed to be unique across the platform.
Could you please delete the respective entries from the ServiceNow and try again by keeping the script enabled.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
So I created a new record in transform map where old SysID is matching with new sysID and coalesce is true. Then the onbefore transform script with change "u_sys_id". SysIDs are matching now. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago