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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

How to change a field type in existing table ?

(0) ShareShare
ReportReport
Posted on by 596

Hi guys,

I'm asking this in relation with development then later for the deployment (maybe to UAT or Production), since I'm experiencing difficulties to change my field from a String to Enum type. Which apparently I need to delete first the field which mean I also need to change (remove) all the reference as and when it is used in code classes or in forms then Build & Synchronized successfully.

Do I need to Check-in first this deletion ? then also wait for the next deployment succeeded, before then I can add new field with the "wanted" field type which is in my case is Enum ?

Or I can, after the Build & Synchronize after the deletion, then Check in, then I can just add the new field, Build & synchronized again, and Check-in again ? 

So when doing deployment, it will know there is two steps : deletion and add new field but with the same name ?

Thanks,

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    237,961 Most Valuable Professional on at

    In general, I recommend creating a new field rather then changing the type of the same field. It's much safer.

    Also, if you want to directly migrate data from the existing (string) field, you'll need both fields existing at the some time, therefore deleting the old field before creating the new one isn't an option.

  • Verified answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at

    I would suggest you to first delete the string field and all related code and do a build sync. On successful build you can checkin that to UAT.  Then add the new enum field and again do build sync and check-in.

    But never try to rename and change the base enum as it is not possible because it is a string field and system won't allow you to do so.

    So on delete the field and checking in will lead to drop the field from uat also and again adding should solve the problem.

  • Voltes Profile Picture
    596 on at

    Noted.

    Thank you both.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 592 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 478 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 305 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans