Options

Item primary key

mpudjampudja Member Posts: 32
Hi everybody,

I have very strange situation, so if anybody can suggest something it would be excelent.

In table Item one emplyee who doesn't know what is primary and what secondary key is, this person put one new field into table Item and after that changed primary key from "No." into "No.","serial no.". When I noticed that I changed primary key back to "No.", but I thin, that's to late ....

Problem is that when we want to changed record in table we get error "Serial No. in table item must be part of the primary key."

e.g
when I put one new Item e.g "A100" and after that I want to put new record with the same "No.", message appears "Item already exists"...

Does any body know what's going on?

Answers

  • Options
    SogSog Member Posts: 1,023
    So employee who isen't qualified to mess with the system messes with the system.
    (S)He'll propably modified the primary key because the same error you get now, appeared when (s)he added the field.
    So solution, remove the new field. Then modify the serial number, finally, rejoice.
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
  • Options
    kinekine Member Posts: 12,562
    e.g
    when I put one new Item e.g "A100" and after that I want to put the same code into new line , message appears "Item already exists"...

    Are you sure that you are talking about Item table??? "into new line"?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    mpudjampudja Member Posts: 32
    Yes, and I find where is the problem.

    The problem was in one develper who made a mistake.
    He put this line into TABLERELATION property of table 39 (Purchase Line )

    IF (Type=CONST(Item)) Item."FA Serial No." WHERE (No.=FIELD(No.))

    But You can't put field (in our example that is "FA Serial No.") into textbox Field if that field not primary key ! ! !

    pic.


    Also, when you go to purchase order and try press Lookup we get the same error: The field must be included in table's primary key....

    Instead tablerelation property he should use flowfield ( lookup func )
    err.jpg 128.3K
  • Options
    kinekine Member Posts: 12,562
    But this is something else than you described in the first post, it is why it didn't make sense. :-)

    Congrat that you solved it... 8)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    mpudjampudja Member Posts: 32
    First, I was confused because person who changed primary key didn't told me that this error shows up before key was changed.

    When he try to rename record in Item table and when error appear he just changed key because error message show that key must be "No.","FA Serial No.", but the problem was in tablerelation property.

    Sorry if I confuse You :D
  • Options
    David_SingletonDavid_Singleton Member Posts: 5,479
    I always love this, because it was the first bug I ever reported in Navision Financials ver. 1.1 the bug is there because of a change in how report objects are numbered compared to the DOS version. The reply I got was that it would be fixed in a later version of Navision, that was in 1996, so I am guessing that this is a bug that will never be fixed.

    :whistle:
    David Singleton
Sign In or Register to comment.