Why does the Key in NAV not match SQL key - Deferral Post. Buffer

RodtmcleanRodtmclean Member Posts: 83
I added a field "Deferral Line No." to the "Deferral Post. Buffer" key, as below. The key appears in NAV from the table designer. However, when I check with SQL Managent Studio, "Deferral Line No." is missing from the primary key.

I have compiled with force, imported the table as text and recompiled and ran Sync-NAVtenant. In the end I added "Deferral Line No." to the key using SQL Management Studio, which I don't like, and my code does as intended.

Original Key
Type,G/L Account,Gen. Bus. Posting Group,Gen. Prod. Posting Group,VAT Bus. Posting Group,VAT Prod. Posting Group,Tax Area Code,Tax Group Code,Tax Liable,Use Tax,Dimension Set ID,Job No.,Deferral Code,Posting Date,Partial Deferral

New Key
Type,G/L Account,Gen. Bus. Posting Group,Gen. Prod. Posting Group,VAT Bus. Posting Group,VAT Prod. Posting Group,Tax Area Code,Tax Group Code,Tax Liable,Use Tax,Dimension Set ID,Job No.,Deferral Code,Posting Date,Partial Deferral,Deferral Line No.

Any thoughts on this one?

Thanks in advance
Roddy

Best Answers

  • RodtmcleanRodtmclean Member Posts: 83
    Answer ✓
    Hi Slawek,

    Thanks for answering, the field count has increased from 15 to 16 in that table. I think you are right its a bug somewhere along the line in NAV.

    Roddy

Answers

  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    Strange one. What happes if you design the table and save it again - does the "Deferral Line No_" dissapear from the PK when you look at it in SSMS ?
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • RodtmcleanRodtmclean Member Posts: 83
    Hi Slawek,

    I hope you are having a good day?

    Deferral Line No_ does not disappear from the key when saving the table from the object designed (I made an unrelated change to the table to force a save). This is on NAV 2018 cu 3 GB with SQL 2016.

    Thanks and Regards
    Roddy
  • RodtmcleanRodtmclean Member Posts: 83
    Answer ✓
    Hi Slawek,

    Thanks for answering, the field count has increased from 15 to 16 in that table. I think you are right its a bug somewhere along the line in NAV.

    Roddy
Sign In or Register to comment.