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 :
Business Central forum

How to update the table column name use upgrade code

(0) ShareShare
ReportReport
Posted on by

Hi everyone,

I have modified one of a table field name and table object ID. When I upload my new extension to the environment. It returns with error " field xxx unsupported change remove". I was trying to use upgrade codeunit to update the field name. How should I do to handle this situation. The table field(column) name change between the old extension and new extension.

To make things more complex. The old schema is a extension that I made for local publish. I mean "local publish" is use id range from 50000 to 99999 and upload the .app file directly. However, I upload the same extension with App ID to the app source and I have to add prefix for some of the table fields. So it not possible to keep the old fields because the field without prefix in table extension is not allow. Is that mean I have to use another App ID for the app source. Otherwise, I was not able to install the app in the MarketPlace forever?

I have raised a qustion here ase well  "dynamicsuser.net/.../how-to-update-the-table-column-name-use-upgrade-code"

Thanks in advance!!

Categories:
  • Suggested answer
    Stefano Demiliani Profile Picture
    37,172 Most Valuable Professional on at

    If you change a field in a production extension, this is considered as a breaking schema change and it must be handled by using the ObsoleteState property and by creating a new field.

    All is explained here:

    demiliani.com/.../dynamics-365-business-central-handling-breaking-schema-changes-on-production

  • Community Member Profile Picture
    on at

    Yes, you are right.However, the reason why we rename these fields is because these fields are missing the prefix. For example, If we use the suggested solution, it required UDF and TRCUDF existed in the table at the same time and mark the UDF as remove. Then copy the value from UDF to TRCUDF. But the extension publish to app source has to include prefix. Otherwise it will have validation error. Which mean UDF in the table is not allowed. It has to use TRCUDF with prefix. This is kind like a dead loop.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans