Preserve Data using script during a clone

daisybora
Tera Contributor

Hi Team,

 

Have anyone come across scenarios where you want to preserve data on a table during a clone, depending on the data on another table.

 

For example, I need to preserve the user roles for members of a group. For this I will need to do a query on the sys_user_grmember table first to get the users and then preserve their roles in the sys_user_has_role table.

 

 

1 REPLY 1

pratikjagtap
Giga Guru

Hi @daisybora ,

You want to preserve user roles assigned to users who belong to a specific group during a clone operation, but this data exists across two tables:

  • sys_user_grmember (maps users to groups)

  • sys_user_has_role (maps users to roles)

During a clone, this data could be lost or overwritten, especially if data preservation rules are not explicitly defined for both tables.

 

Let me know if u need steps .

 

If this solution helps you then, mark it as accepted solution ‌‌✔️ and give thumbs up 👍 !

 

Regards,

Pratik