web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Items with History Changed to Lot Tracked

(0) ShareShare
ReportReport
Posted on by 4
Greetings, I've seen a few posts that address turning on lot tracking for an existing item that has history and understand the best methods to do so (if planned properly), however, in my case, the items have already been change via SQL. (To save face... I was not involved in this process). Long story short, hundreds of inventory items were change from not tracked to lot tracked via SQL (someone did not think this through). Now, as expected, every transaction for these items is failing because the quantities on hand or sold don’t have an associated lot number. We do a lot of RMAs and I’m having to manually “turn off” tracking while the user receives and then turn back on once complete. I can see this becoming a serious nightmare. Does anyone know of a way to get around this? I’m thinking of perhaps assigning a dummy lot number where appropriate (Sales History, Inventory on Hand, etc.) Thanks in advance! Jim

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Mahmoud Saadi Profile Picture
    32,738 on at

    Hello Jim

    I have been there before, seen this horrible nightmare as well. Unfortunately, you always have to deal with the situation as is regardless of what's been done, why and by whome.

    You may consider one of two options in order to stop the bleeding:

    • Removing the lot number tracking on the SQL level:  you need to consider all associated modules (distribution modules primarily). Take all the inventory out and then activate the lot number tracking option. Once activated, re-enter cost layers (precise cost layers with precise dates, not inventory opening balances)
    • Creating dummy lots which could primarily affect the quality of data (lot numbers precisely), these lot numbers are to be linked with the original receipts in order for the system to proceed with the standard behavior as expected
    For me, I personally chose option one and it took me almost a full working day to ensure that I had inventory balances returned with precise cost and correct lot numbers. I do recommend this scenario since it is logical and have proper justification for both the accounting department and auditors.
    Hope you get rid off such nightmares smoothly 
    Please never hesitate to share any further inquiries, 

  • Jim Lines Profile Picture
    4 on at

    Mahmoud,

    Thank you for your quick and detailed response.  I will meet with the team and see what is the best option for us.  I will follow up with any results.  Thanks!

    Jim

  • Jim Lines Profile Picture
    4 on at

    Mahmoud,

    What do you know about items that were sold (SOP Docs moved to history) and then items are returned via RMA?  Would you agree that those historical transactions would need to have a lot number assigned?

    Jim

  • Mahmoud Saadi Profile Picture
    32,738 on at

    When posting a sales transaction with items tracked by lot numbers, the sales transaction is moved to history immediately, while lot details are stored in SOP10201, These details remain in history even if a return for the sales transaction is made afterwards. Meanwhile, you need to take into consideration that the RMA will store lot details in SVC05255. 

    Never hesitate to share any further inquiries, 

  • Mahmoud Saadi Profile Picture
    32,738 on at

    Jim

    Any updates regarding your case ?

  • Jim Lines Profile Picture
    4 on at

    Mahmoud,

    I presented the information to our inventory control team and they are going to make a decision on what to do.  I think we're going to go the route of backing out all inventory.  Once we complete, I'll give a follow up.  For now, I'll confirm your answer.  

    Thanks!

    JIm

  • Jim Lines Profile Picture
    4 on at

    Mahmoud,

    I'm finally getting around to fixing this because our inventory control people want to do another round of changing non-tracked to lot-tracked.  Regarding your original recommendation, I want to go with option 2 and create dummy lot numbers.  Can you advise how to go about doing this?  I know it's not the cleanest way of doing this, but if I could cut down the number of problems I have with turning on/off tracking so users can sell/receive, etc. it would be an enormous help.  

    Thank you in advance!

    Jim

  • Mahmoud Saadi Profile Picture
    32,738 on at

    I shall do a full cycle test and keep you updated

    I will get back to you shortly

  • Suggested answer
    Mahmoud Saadi Profile Picture
    32,738 on at

    Hello Jim

    As derived from the complexity of lot number tracking process in Dynamics GP, and the degree to which it is involved in several distribution modules such as purchasing, sales, inventory, manufacturing ..etc. The test has been limited only to POP, SOP and IV lots. The lot number tracking primary tables, on which all the modules depend for open cost layers is (IV00300), this tables retrieves primarily form (IV10200) for the items with lot number tracking option enabled, and available quantity on hand.

    Other modules, stores historical lots and details since the open lot table (IV00300) get cleared out when the lot is consumed. I have followed the following testing criteria and here are my results:

    • Manual Insertion, for the primary Inventory table. Through this scenario, I posted all the pending transactions related to inventory, cleared all the lot related tables (POP10330, SOP10201 and IV00300, IV00301). Historical lot tables are not touched, since it should not affect open transactions, no harm to keep them. The following script was built to re-create the lot in IV00300

    USE TWO
    INSERT INTO dbo.IV00300
            ( ITEMNMBR ,
              LOCNCODE ,
              DATERECD ,
              DTSEQNUM ,
              LOTNUMBR ,
              QTYRECVD ,
              QTYSOLD ,
              ATYALLOC ,
              UNITCOST ,
              RCTSEQNM ,
              VNDRNMBR ,
              LTNUMSLD ,
              QTYTYPE ,
              BIN ,
              MFGDATE ,
              EXPNDATE
            )
    SELECT  A.ITEMNMBR ,
            A.TRXLOCTN AS LOCNCODE ,
            A.DATERECD ,
            A.DEX_ROW_ID AS DTSEQNUM ,
            A.DEX_ROW_ID AS LOTNUMBR ,
            A.QTYRECVD ,
            A.QTYSOLD ,
            0 AS ATYALLOC ,
            A.UNITCOST ,
            A.RCTSEQNM ,
            A.VENDORID ,
            0 AS LTNUMSLD ,
            A.QTYTYPE ,
            0 AS BIN ,
            '1900-01-01 00:00:00.000' AS MFGDATE ,
            '1900-01-01 00:00:00.000' AS EXPNDATE
    FROM    dbo.IV10200 AS A
    LEFT OUTER JOIN dbo.IV00101 AS B
    ON A.ITEMNMBR = B.ITEMNMBR
    WHERE B.ITMTRKOP =3 AND A.QTYRECVD-A.QTYSOLD <> 0 AND A.RCPTSOLD <> 1

    Furthermore, proceed with the usual reconciliation and check links as a must in such a case.

    • The second testing scenario, was more simple and straight forward. I followed the same steps by posting all the pending transactions, clearing the lot tables and then instead of inserting lot numbers manually (fabricated lots), I have proceeded with the reconciliation immediately. And here is the interesting part, new RECON lots have been created in all the lot associated tables according to the open cost layers. I believe, this is the ultimate solution instead of fabricating lots.

    Finally, as I previously mentioned, I do not recommend this solution as a work around, but it would be application in case further testing is applied. For the mean time, you may proceed with creating a testing environment , and apply the testing scenario.

    Keep me posted on your findings,

    Looking forward to hearing what's hiding beneath your database records, since your it has gone through a lot and we never know how things would go with you :)

  • Mahmoud Saadi Profile Picture
    32,738 on at

    How is the progress of this interesting issue

    Looking forward to hearing your kind feedback

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans