Key Issue

vikram7_dabasvikram7_dabas Member Posts: 611
Hi
I have created one Boolean field(Named "LG Item") in Item table(27) when I m going to Rename any record from Item card.First it asks Do you want to rename the record?Yes or No.I pressed Yes then it is modifying records in Item Ledger entry and all Item related transaction tables,then it shows me error:-->

The Field below mustb be included in Primary Key
Field:LG Item
Table:Item

I am not able to remane the record.I m using 4.0 SP3 SQL Database.
I have not done any major customization regarding this ("LG Item") field.I have only flow this ("LG Item") field in Purch. Line,Sales Line,Item Ledger Entry,Value Entry,Transfer Line only.
Vikram Dabas
Navision Technical Consultant

Comments

  • awarnawarn Member Posts: 261
    Probably one of those flowfields has an incorrect formula. Make sure the WHERE("No.") = "No." is in each one.

    -a
  • vikram7_dabasvikram7_dabas Member Posts: 611
    Dear
    "LG Item" field in Item table is not a flow field.If u r talking about all fields in Item Table then I have checked it there is no incorrect calculation formula.If u r not talking about base fileds(flow fields) then I have not created any Flow field.
    Vikram Dabas
    Navision Technical Consultant
  • awarnawarn Member Posts: 261
    Sorry - you wrote:

    I have not done any major customization regarding this ("LG Item") field.I have only flow this ("LG Item") field in Purch. Line,Sales Line,Item Ledger Entry,Value Entry,Transfer Line only.


    I mean on the Purch. Line, Sales Line, Item Ledger Entry, Value Entry, Transfer Line, one of THOSE flowfields probably has the incorrect definiation.
  • vikram7_dabasvikram7_dabas Member Posts: 611
    Dear
    Give me the solution
    Vikram Dabas
    Navision Technical Consultant
  • awarnawarn Member Posts: 261
    Dear,

    Show me the tablerelations for the flowfields. I can tell you one of them is probably wrong, so you could look at it (as per my first email), or you can post it and have me look at it, it is probably easlier for you to look at it first.
  • DenSterDenSter Member Posts: 8,305
    Only when you want to change the primary key of a table would you use RENAME, otherwise you simply change the field you want to change and use MODIFY to write it to the database.

    You should probaly change it to something like:
    MyItem."LG Item" := TRUE;
    MyItem.MODIFY;
    

    By the way..... this is not the correct way to go about getting answers in this forum:
    Dear
    Give me the solution
    We're not in the army here, it would be much nicer to formulate it as a question
  • kinekine Member Posts: 12,562
    Hi
    I have created one Boolean field(Named "LG Item") in Item table(27) when I m going to Rename any record from Item card.First it asks Do you want to rename the record?Yes or No.I pressed Yes then it is modifying records in Item Ledger entry and all Item related transaction tables,then it shows me error:-->

    The Field below mustb be included in Primary Key
    Field:LG Item
    Table:Item

    I am not able to remane the record.I m using 4.0 SP3 SQL Database.
    I have not done any major customization regarding this ("LG Item") field.I have only flow this ("LG Item") field in Purch. Line,Sales Line,Item Ledger Entry,Value Entry,Transfer Line only.

    This is side effect of making TableRelation on some field leading to non primary key field. You set somewhere table relation Item."LG Item" which is not possible. You can make only TableRelation Item."No.".
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.