TableSync 'move' fails

EvREvR Member Posts: 178
In an updated 2013 (to 2016) database I'm having issues with a table sync upgrade. I've copied the original table to a new temporary table. Removed all code and variables from the new table. All fields are the same and so is the PK (even ran a text compare to confirm).

By my upgrade CU is throwing this error:
Sync-NAVTenant : When the TableSynchSetup.Mode::Move mode is used in an upgrade codeunit for synchronizing a table, the structure of the upgrad
e table must match the original table. The fields and the primary key of the upgrade table must match those in the original table.
The following errors must be fixed:
The definition of the upgrade table 'UPG-Extended Text Line' must match the definition of the old table 'Extended Text Line'.
Upgrade table 'UPG-Extended Text Line' cannot have fields which have a different design in the original table 'Extended Text Line': 'Text'.
At line:1 char:1
[TableSyncSetup] TableSyncSetup(VAR TableSynchSetup : Record "Table Synch. Setup")
DataUpgradeMgt.SetTableSyncSetup(DATABASE::"Extended Text Line",70500,TableSynchSetup.Mode::Move);

Any suggestions?

Answers

  • kalyankandimallakalyankandimalla Member Posts: 56
    Can you please check if all the fields in upgrade table 'UPG-Extended Text Line' have same data types, field length when compared to original table.
  • EvREvR Member Posts: 178
    edited 2017-04-07
    Yes they are. Like I said, I even ran a text compare of the 2 tables.
  • vaprogvaprog Member Posts: 1,148
    Hi EvR,

    Open your Upgrade table again in the dev environment, and save it with sync mode force.
    Then check your call to SetTableSyncSetup if the two table ID fields are correct.
    Then try again.
  • BeliasBelias Member Posts: 2,998
    Also check if the upg and the original table have the same primary key, and the same field numbers (ids)
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • MNNMNN Member Posts: 1
    edited 2025-01-12
    I found different primary keys for UPG Custom Report Layout(int) and Custom Report Layout(code).
    then I modified UPG Custom Report Layout primary key to code and force compiled. I got the below error in syncNAVTenant.

    Is there any solution for this?

    Sync-NAVTenant : Changes to the tenant database could not be applied. Affected tables will not be available.
    The first error was:
    When the TableSynchSetup.Mode::Move mode is used in an upgrade codeunit for synchronizing a table, the structure of the upgrade table must match the
    original table. The fields and the primary key of the upgrade table must match those in the original table.
    The following errors must be fixed:
    The definition of the upgrade table 'UPG Custom Report Layout' must match the definition of the old table 'Custom Report Layout'.
    Data in the fields 'ID' in the original table 'Custom Report Layout' cannot be saved in the upgrade table 'UPG Custom Report Layout'. Please make sure
    that listed fields are present in the upgrade table and they match equivalent fields in the original table in terms of their design.
    Original table 'Custom Report Layout' cannot have fields which do not exist in the upgrade table 'UPG Custom Report Layout': 'ID'.
    The upgrade table UPG Custom Report Layout cannot have fields that do not exist in the original table, Custom Report Layout. The following fields are
    not allowed: Code.
Sign In or Register to comment.