The CreatorCon Call for Content is officially open! Get started here.

When importing a User Group, I also want the Sys ID to be the same for the source and target.

d-aizawa
Kilo Sage

Hi.

I'm trying to import Users and Groups from a source instance to a target instance due to certain requirements.

I accessed sys_user_group.list, exported it in excel format and imported it into the target instance.

However, the important thing here is that the Sys ID does not match between the source instance and the target instance.

How do I match the Sys ID?

Thank you!

1 ACCEPTED SOLUTION

Nitin22
Tera Expert

Hi Aizawa,

Its better if you use XML export from your source instance and XML import in your target instance. It will be done quickly and you don't need to create any import set or transform map. Also sys_id's will be same in both instance.

If you find this answer helpful please don't forget to mark it Helpful. Thank you.

 

 

View solution in original post

4 REPLIES 4

Tom Sienkiewicz
Mega Sage

you cannot do it with direct excel import, to preserve the source sys_id, you need to use Import Set / Transform Map and then in the transform script, you need to set something like target.sys_id = source.sys_id.

This should go either in a specific field mapping script, or as onBefore transform script.

 

d-aizawa
Kilo Sage

Thank you for answering my question.

I'm very sorry for the rudimentary confirmation.

In the above case, which format is better for exporting and importing Group and User?

Excel, XML, CSV?

Thank you!

So now that I think about it, I misread your question initially. If you can consider XML export/import, that is the easiest way.

This also preserves the original sys_ids. 

So just export as XML from the list view on source instance, then import XML from list view on the target.

You would need to consider export/import from a few tables:

sys_user

sys_user_group

sys_user_grmember

sys_user_has_role

sys_group_has_role

Nitin22
Tera Expert

Hi Aizawa,

Its better if you use XML export from your source instance and XML import in your target instance. It will be done quickly and you don't need to create any import set or transform map. Also sys_id's will be same in both instance.

If you find this answer helpful please don't forget to mark it Helpful. Thank you.