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 :
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
    107 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
    98,421 Super User 2026 Season 1 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,857 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,047 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 959 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans