How to add into Update set deleted record?

petorepan
Kilo Contributor

Hi all,

I know it's possible to force record to update set by the code below:

gr.insert();

var um = new GlideUpdateManager2();

um.saveRecord(gr);

However, how can I put into Update set the flag that the record is deleted?

gr.deleteRecord();

var um = new GlideUpdateManager2();

um.saveRecord(gr); // does not work, because gr is deleted....

7 REPLIES 7

bernyalvarado
Mega Sage

Hi Peter,



This is normally automatically captured within your active update set (sys_update_xml). You just need to assign that record to the desired update set.



Thanks,


Berny


bernyalvarado
Mega Sage

One clarification though. Keep in mind here we're talking about definition/schema related changes. On the other hand, Data related changes are not stored within an update set, but can be moved as xmls through instances.



Thanks,


Berny


bernyalvarado
Mega Sage

The following should also be helpful: Update sets capture what?



Thanks,


Berny


Jaspal Singh
Mega Patron
Mega Patron

Hi Peter,



Update sets capture what? would help you understand what all things are captured in update set. In your case, yes it will get captured in the update all you need is to verify sys_update_xml table for confirmation.