How to import deleted record changes from Dev instance to Test instance?

Farah5
Tera Contributor

I have a table that contains 9 records, and these records already exist in our DEV, TEST, and PROD instances. My requirement is that I need to delete only one record, but I know that data changes don't get captured in update sets. Normally I would just export the table to XML and import it in the new instance, except I don't know if that will just create duplicate records, since all these records already exist in my other instances?

What is a good way to get go about this? I can't just go into the table in TEST and PROD and delete that one record, my employers wouldn't be okay with that solution.

1 ACCEPTED SOLUTION

asifnoor
Kilo Patron

Hi,

I don't think through xml import or through update sets, the record can be deleted, because data is specific to the instance and hence they are not directly captured unless explicitly done. Even when you explicitly try to capture, they only capture what exists in the current instance.

If the data itself is deleted in dev instance, it will not be captured anywhere and hence you cannot make it affect in other instances. 

You might have to delete the record from the instance manually or you can write a fix script and then push that fix script through update set and run in the required instances.

Kindly mark the comment as a correct answer and helpful if it helps to solve your problem.

Regards,
Asif
2020 ServiceNow Community MVP

View solution in original post

7 REPLIES 7

Jaspal Singh
Mega Patron
Mega Patron

Hi Farah,

 

Export-Import of XML will not create new entries if the sys_ids for the records are same. If you are sure that these records in DEV, TEST & PRD have same sys_ids then export-import of XML will not have any new record created. If required, you can check for the sys_ids of those records across instances for confirmation.

Hi Jaspal, 

 

Okay, I didn't know that so that's great to find out. However, this still doesn't solve my immediate issue, which is figuring out how to track a record deletion on a table so that I don't have to go to that table in every instance to delete one record. 

Hi Farah,

 

Unfortunately, deletion will have to be taken care on all instances independantly. Deletion in one table does not mean it will delete in other instances as well when you do an export-import.

Kunal Varkhede
Tera Guru

Hi,

 

Yes i agree with @Jaspal Singh

If the sys_id are same then record is not created again.

And if you delete records from one instance while moving it wont affect other instance because it is not captured in update set. In this case if it is possible try to delete record manually in each environment

 

Thanks,

Kunal