How to change the Primary key in Table 337???

kishi_gkishi_g Member Posts: 162
Hi,
i will change the Primary key in Table337(Reservation Entry). by default the Primary key is Entry No. and positive fields. now I want to add Source ID also a Primary key. Iam getting the error when i am posting Purchase order with Item Tracking (Lot number). where can i modify the code.

In Codeunit 9900830 - Trasnfer Reserventry - they assigned

NewReservEntry."Source ID" := NewID;

here newID is empty was assigned to NewReservEntry.now i comment this line. Posting was happnd but when i go to the item card -> Entries -> Item tracking lines. it was showing empty. it is not created.

how can i do that.

Kindly share ur ideas...


Thanks & Regards,
kishore...

Comments

  • JoeriJoeri Member Posts: 75
    Please don't change this key. Why do you want to do this ? Anything to do with reservations is very complicated and shouldn't be changed without serious thought.

    What are you trying to accomplish ?
  • kishi_gkishi_g Member Posts: 162
    Hi,
    Thanks for ur reply.

    Because we had one store and one HO. In HO we will made purchase orders and in store also they made local purchases. now the data comes from store to HO. It will overwrite the data in HO DB.

    Now i want to add Source ID as primary key then the problem will solve.


    how can i do that...

    Thanks & regards,
    kishore...
  • tinoruijstinoruijs Member Posts: 1,226
    Like Joeri said; You don't want to mess with reservation entries... [-X

    You should solve the error you get when you post by using the right data. Not change NAV-code or basic tables to import your wrong data.

    You are importing Purchase orders that have been exported from the store-db?

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • matttraxmatttrax Member Posts: 2,309
    So you have two locations, Home Office and Store. They both make purchases for themselves, but the purchases the store makes are sent to the home office so that they can place the order?

    Where do the items ship to? The home office or the store? Who is billed for it?
  • ara3nara3n Member Posts: 9,256
    Also, why are you replicating this table?
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • kishi_gkishi_g Member Posts: 162
    Hi,
    Thanks for ur replies. Store People Create the Purchase Orders and they will sent to HO for Approval. if HO is approved then the store receive the Purachase order. In HO they will Post as Receive & Invoice.

    data will not overwrite in Table 337 when i replicate the data from Store to HO.

    How can i do that????



    Thanks & Regards,
    Kishore.
  • DenSterDenSter Member Posts: 8,307
    I'm not going to give any tips on this one. This can only end in problems. You need to leave that table's primary key alone.
  • matttraxmatttrax Member Posts: 2,309
    So the General tab would be the store
    The invoicing tab would be office
    The shipping tab would be the store

    If you are on 5.0 you can setup Document Approvals. If not, just have the store release the POs. Then the office can come in, filter on what is released, and if they approve it they can post it at that time. The business process is really up to you / them.

    You could even add a field for "Approval Status" if you absolutely had to, but I don't think it is necessary. There is certainly no need to change the primary key for T337.
Sign In or Register to comment.