How to change A primary key in 5206,5217 ,5213 tables

lakshmanlakshman Member Posts: 44
Hi all ,

i added one field "Employee No" (id 50000) in 5206 table .i want to set
"Employee No" as a primary key .i tried but i got an error .how can we change it
please suggest me.

regards
lakshman
Best Regards,
Lakshman Routu
http://lakshman-routu.blogspot.in/

Answers

  • MBergerMBerger Member Posts: 413
    Changing the primary key in NAV is VERY dangerous; All get statements need to be changed etc.

    i am guessing that you want the new field to be unique amonst all record in the table, best way to do that is via code. In the validation of the field check if there is another ( so primary key is NOT the same as the current one ) record with the same value and give an error if that is the case.
  • DenSterDenSter Member Posts: 8,304
    Yes I would agree. The primary keys of standard NAV tables is off limits in 99.99% of the time. The remaining 0.01% is only when the primary key is changed for technical purposes, not functional purposes.

    Better than to modify standard NAV functionality to solve your requirement is to develop custom functionality with new tables.
Sign In or Register to comment.