Replicate field promoted by GlideDBUtil.promoteColumn script in distinct instances

Santos
Giga Contributor

Hi, 

We have 3 instances: 1 for production environment and 2 for no-production environment.

All of them have the same sys_id for the table fields.

We have apply in one instance the script "GlideDBUtil.promoteColumn('incident', 'task', 'u_commerce_number', true);" to move a field from the incident table to the task table. 

It has worked fine and the field has move correctly with all the values, but the sys_id has changed. 

My doubt is how to do the same in the others instances but maintain the same sys_id that has been assigned in the first instance. 

Thanks.

1 ACCEPTED SOLUTION

ServiceNow Tec2
Mega Sage
This has been resolved by ServiceNow Technical Support. Please refer to KB0743116 for more information.

View solution in original post

2 REPLIES 2

Chetan12
ServiceNow Employee
ServiceNow Employee

Please check if below KB helps.

https://hi.service-now.com/kb_view.do?sys_kb_id=3bf8f710db933fc0fff8a345ca96192a

 

To promote a field to the parent table you can either:

  • create a new field directly on the parent table and use it as an alternative OR
  • delete the column from the child table and recreate it in the parent table. The recommended way would be to: 
    • Copy data to a staging table via script or export it to CSV or Excel as a backup before deleting the current field. 
    • Delete the field and re-create it where required. 
    • Depending on how you backed up the data, you can run a script to copy it from the staging table or use transform maps to import it from exported files. 

 

 

ServiceNow Tec2
Mega Sage
This has been resolved by ServiceNow Technical Support. Please refer to KB0743116 for more information.