web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Best approach when DB sync table schema change issue

(1) ShareShare
ReportReport
Posted on by 558
Hello everyone,
 
I have a table with a field having type Enum, and after using for several time in production, we have to change the type to string, and result Build error, because of this conversion
 
May I know the best way to solve the error ? the error suggest us to delete the object (table), but it already contain many rows, also several object like data entity, security keys, forms that using this table. Wouldn't it produce more error if I delete the table ?
 
Can I get advice how to resolve this ?
Thanks
Categories:
I have the same question (0)
  • Jonas "Jones" Melgaard Profile Picture
    5,010 Most Valuable Professional on at

    There is no fix for the error other than to rethink how to change the type of the field. And when you are in PROD, your options are pretty limited.

    I'm used to creating a new field on the table, instead of changing the type; not removing the table. This approach leads to fewer issues but requires some effort in updating it in tables, etc. Once you have migrated the data using a job and are confident in the migration, you can remove the old field from PROD.

    Can you use this approach?
    Also, you mention security keys. Is this part of an ISV solution?

  • Anthony Blake Profile Picture
    3,092 Super User 2026 Season 1 on at
    Hi Ken
     
    I agree with Jonas, create a new field and migrate to it.
     
    Anthony
  • Suggested answer
    Sankar Ramalingam Profile Picture
    262 on at
    You can't change the Table field data type directly as in the DB, it has to recreate the field.
     
    Solution:
     
    1. As "Jonas" suggested, you can create a new field to store the value as string.
    2. If you want to have same field with data type change Enum > String
        2.1. Least worried of data in the field in Prod - You can delete the field from your table and deploy to PROD. And again add the field with String field and deploy the package to Prod. 
        2.2. Worried of data in the field in Prod - You can create a new field to store the value as string and write x++ job to copy data from Enum to string using "enum2str()". Deploy it to Prod and run the Job. Again, follow 2.1.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 617

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 461 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 298 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans