Issue during changing type from Duration type to choice type

_bhishek
Tera Guru

had to change the type for one field from duration to choice .We can not change directly the type from duration to choice .So i created one temporary field and stored existing data in that field .

Then created a new update set.

After that  i deleted the current duration field and added new field with choice type with same column name which i had for duration to avoid other related issues. I was able to do this in lower instance but when i am moving update set , I am getting error like type conversion is not allowed from duration to choice for this column name. What should i do now . Please help ,do i need to move deletion in separate update set if yes then how should i capture deletion now in lower instance (moving the changes from DEV TO TEST ,i have duration field available in STAGE and PROD now).When checking the versions in DEV for newly created choice type field dictionary  (previously i had same column name duration field), I can see deletion is captured and on same field insert/update is captured  and type changed. Please suggest me the way to rectify the error in update set in TEST instance also how can fix and move the newly created field in TEST and remove duration field in TEST.

 

Thanks

10 REPLIES 10

Bert_c1
Kilo Patron

Create a new update set in dev. Move the deletion update to that update set. complete that and promote to higher instances, before you promote/commit the first update set. so you'll need two update sets, one with the deletion, the other with the rest of your updates. If you see a Preview error for the dictionary record when previeing the 2nd update set, this is due to the 'delete' having a later create/updated date. You can ignore that, select "Accept remote update" for the preview error. As we know the cause and you want the column added with the new type.

 

You can move updates from one update set to another but opening the sys_update_xml record, and change the Update set field

Thanks for your response,

How should  i  move deletion of field.As when i deleted field ,deletion was captured and when i created new field with same column name.On the same customer update ,it is updated as insert/update.How can i get customer update for deletion of field .

 

look in the sys_update_xml table for a record with 'sys_dictionary_[table_name].[field_name']' Like

 

sys_dictionary_u_test_table_u_state

which is the u_state field on my u_test_table table.  like:

Screenshot 2025-06-15 143546.png

where an admin user can change the "Update set" value there. User you new update set name for the deletion.

I realized the last update is in sys_udate_xml, previous versions are in the sys_update_version table.  What you can do is start a new update set, capture the 'delete' of the table field there. Complete that and promote. then use the update set that contains the field defined as desired. You will need to re-create the field in dev after capturing the deletion.

Bert_c1
Kilo Patron

if all else fails, restore the instance from before the change. Capture the deletion in one update set. Capture the new field creation in another update set.