Force an update to an update set

sachinbhasin
Kilo Explorer

I did the following script for adding records manually from my dev instance to prod. However when I force update user versus group mapping updates to an existing update set then it ignores the users

var rec = new GlideRecord('sys_number');

rec.get('973c8e8a9d022000da615b13b3a22f32');

//Push the record into the current update set    

var um = new GlideUpdateManager2();

um.saveRecord(rec);

I think the probable reason is because the sys_id of the user record in dev is different from the sys_id of the same user record on Prod. What do you think ? any remedies for these kind of requirements when a user versus group dependency needs to be mapped for small data (1-5 groups)

Regards

Sachin

3 REPLIES 3

Inactive_Us1474
Giga Guru

you can use import and exporting the xml files which in turn will keep the sys_id same.


Akhil, that's correct. However that is still a manual step post code migration. Any other approach ?


Maik Skoddow
Tera Patron
Tera Patron

Hi @sachinbhasin 

your issue description is really confusing. You write about user records and group mappings but your sample code shows a 

new GlideRecord('sys_number');

Some thoughts on that:

  • Yes, the Sys IDs of the user records have to be the same in DEV and PROD if you want transfer the group mappings from DEV to PROD. There are different approaches to ensure that
  • Update Sets are not intended to transfer real data from one instance to another. Better approach is exporting XML and importing that XML in target instance. Even better would be an integration. which pushes the group mappings from one instance to another via REST calls.

Maik

Maik