Skip to main content

Notifications

Community site session details

Community site session details

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

Change datatype of an existing field or create new field of table in Prod D365 FO

(0) ShareShare
ReportReport
Posted on by 64
Hi,
 
I have a field in table /DemoTable/ with name as /Amount/ and datatype integer , however now as per the requirement /Amount/ should be a real field. This table is already in Prod environment and there is also data in it.
The question is what the proper approach is,
1) Shall I delete and create a new Real field with same name, off course I will restore the data in that field post creation later.
OR
2) Create a new real field /AmountNewReal/ and restore data in the new field, make the old field /Amount/ as visible false.
 
I have checked some blogs and it says that there are too many issues if you go with option 1 however, I want to know if there is a way to fix it by option 1 as I might have to change all the references related to it.
 
Thanks,
VK
 
  • Suggested answer
    Mohit Rampal Profile Picture
    12,558 Moderator on at
    Change datatype of an existing field or create new field of table in Prod D365 FO
    Hi, As Andre mentioned, safest option is creating a new field. You can copy the data to new field, Find reference on old field and replace it in all code level. Hide or delete the field in form level, data entities etc and add the new field.
  • Suggested answer
    GirishS Profile Picture
    27,825 Moderator on at
    Change datatype of an existing field or create new field of table in Prod D365 FO
    Hi Vicky,
     
    2nd option will be better as it will have option to restore the data from previous fields using custom scripts. If you go with 1st option of deleting the field and recreating the field, you need to take a backup of existing data and restore it back the new field.
    1st option will be little bit time consuming when compared to the 2nd option.
     
    Thanks,
    Girish S.
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    294,157 Super User 2025 Season 1 on at
    Change datatype of an existing field or create new field of table in Prod D365 FO
    Hi VK,
     
    If the field is already on a production environment, you can't simply change the data type as the database synchronization will fail. The safest option would be creating a new field. Then you can also create a script to copy the data from the old to the new field without any possible loss of data.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,157 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,938 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans