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 :
Small and medium business | Business Central, N...
Suggested Answer

Change primary Key fields

(1) ShareShare
ReportReport
Posted on by 33
I have a custom table in BC, and I need to add another field into the primary key. However it will not publish if I try that.
This table has no data in it so no issue with losing any data.  I have tried the below method however it seems to have no effect.
 
I have the same question (0)
  • Divan Profile Picture
    105 on at
    Hi,
     
    Are you using docker or something similar to test the code where it will not publish?
     
    If so you can change the launch.jason file to recreate instead of synchronize:
     
    "schemaUpdateMode": "Recreate"
  • Suggested answer
    Govinda Kumar Profile Picture
    2,304 Moderator on at
    In the launch.json file, set the Schema Update Mode to "Recreate"..
     
     
    Since you mentioned that there is no data in the table, it will automatically delete your existing data. You can proceed either directly publishing the project or by building the project (pressing Ctrl+Shift+B) and then manually uploading the .app file
    Regards
  • Suggested answer
    YUN ZHU Profile Picture
    95,331 Super User 2025 Season 2 on at
    Hi, just to add one more point, if it is a production environment, please refer to the documentation below.
    Business Central 2021 wave 2 (BC19) new features: Force sync of customer-specific extensions in online environments (ForceSync mode in Production Environment)
    In-depth testing for Force Sync mode in Production Environment (Renaming tables, Renaming fields, Changing field type…)
    https://yzhums.com/18755/
     
    Hope this helps as well.
    Thanks.
    ZHU

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,143

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,694 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,067 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans