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

Rename field in Table

(1) ShareShare
ReportReport
Posted on by 4,131

Hi,

I found an interesting issue in D365FO. In AX 2012, if we rename a field in a table, for example, CustTable.TrxCustName -> CustTable.TrxCustNameNew. After database sync, the data on the column still exist. However it seems in D365FO, since there is no such field ID on the field anymore, if we rename the field, the values on the field will be completely lost?

Thanks,

  • Suggested answer
    Satish Panwar Profile Picture
    14,673 Moderator on at

    Hi Yuji,

    I don't think you will be able to rename the field in D365FO, see what you can do on existing fields.

    docs.microsoft.com/.../modify-existing-field

  • Yuji Profile Picture
    4,131 on at

    Hi Satish,

    Actually I provided a wrong example, what we did is all on a custom table and custom fields, not extending any standard tables. But we did rename the field on the custom table, but we found we lost all the data on that column, are you aware of any way we can retain the value?

    Thanks,

  • Suggested answer
    Satish Panwar Profile Picture
    14,673 Moderator on at

    correct. Renaming will truncate data from the field. One option is to create a new field, move data to new field through first deployment. then delete existing field through subsequent deployment.

    If it's just in DEV environment, you should be able to do this much easier (no deployment necessary).

  • Suggested answer
    Sukrut Parab Profile Picture
    71,741 Moderator on at

    If you  want to rename field create new field,  deploy  new field  and write script to transfer data from old field to new field and then in another deployment delete old field.

  • Suggested answer
    Sukrut Parab Profile Picture
    71,741 Moderator on at

    If you delete/ rename field with out taking back up of data in another field you are going to loose data

  • Suggested answer
    nmaenpaa Profile Picture
    101,172 Moderator on at

    In D365FO renaming an object is the same than deleting the original object and creating a new one. So you will lose data. 

    You need to first deploy the new field, then copy old data to it, and only then deploy a version where the old field is removed. Or even easier, don't rename the field.

  • Joris dG Profile Picture
    17,782 on at

    The price we pay for no longer dealing with table and field IDs :-)

  • Rudi Hansen Profile Picture
    4,079 on at

    Another good thing about AX lost :-(

  • Blue Wang Profile Picture
    Microsoft Employee on at

    Hi Yuji,

    As mentioned above, if you change the field name or delete the field directly, the data will be lost.

    -

    But for deleted fields, you can set the configuration key to SysDeletedObjects.

    75774.PNG

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
Martin Dráb Profile Picture

Martin Dráb 544 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 347 Super User 2026 Season 2

#3
CU-1234529-002 Profile Picture

CU-1234529-002 197

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans