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 :
Microsoft Dynamics GP (Archived)

upgrade an existing SQL table using Dexterity

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I have created a small add-in for GP using dex with a few tables.  Recently, I made some changes to this add-in, as well as added a new column to one of the table definitions. 

When i install the new .cnk file i get a sql error stating that the table definition doesn't match. I know why I am getting this error (the new column) but i don't know  how do I upgrade the table definition via code rather than drop and recreate the table.  I looked at an example of a table conversion on Customer Source but that seems really extensive for just adding a column to a table.  Can anyone point me in the right direction here to a blog post or other form of example?

Thanks,

Aaron

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Hi Aaron,

    This post is very old, but for the sake of answering it I have run SQL Maintenance from GP 10.0 and select my product from the drop down. Search for my custom table and select options Drop Table, Create Table, Drop Auto Procedure and Create Auto Procedure. After selecting click Process button and it will resolve your issue.

    Waliullah

  • Suggested answer
    soma Profile Picture
    24,410 on at

    If you added any addition column to existing tables, you can't upgrade the table without drop and recreate.

    To recreate table manually follow Waliullah suggestion.

    If you want to drop and recreate the table from code, call the get table table_name code in Startup script from Dexterity. While login into GP, it code will recreate you table automatically or write a SQL statement code via dexterity to drop and recreate tables.

    Hope this helps!!!

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 > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans