Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Multiple lot expiry date error

(0) ShareShare
ReportReport
Posted on by 10

Encountered this error possibly from reclassifying item that had no expiry date to an existing lot.

00A09318_2D00_11F8_2D00_4BBC_2D00_A6D8_2D00_5242AC673631.jpeg

now I cannot do anything with this lot. Have tried to reclass and it gives me the same error.

any ideas would be a great help solving this

  • Dimitri Kambas Profile Picture
    Dimitri Kambas 10 on at
    RE: Multiple lot expiry date error

    So I managed to create a codeunit to update the expiry dates and it worked. Here is the code for anyone if they ever experience the same issue :

    codeunit 50108 "Update Expiration Date CU"
    {
        Permissions = Tabledata "Item Ledger Entry" = rm;
    
        procedure UpdateExpirationDate()
        var
            ItemLedgerEntry: Record "Item Ledger Entry";
        begin
            ItemLedgerEntry.Reset();
            ItemLedgerEntry.SetRange("Item No.", 'YOUR ITEM NO','YOUR ITEM NO');
            ItemLedgerEntry.SetRange("Lot No.", 'YOUR LOT NO','YOUR LOT NO');
            ItemLedgerEntry.ModifyAll("Expiration Date",20250201D); //DATE FORMAT YYYYMMDD with D at the end
        end;
    }
  • Dimitri Kambas Profile Picture
    Dimitri Kambas 10 on at
    RE: Multiple lot expiry date error

    So i checked the items bin locations and filtered by the lot and then create the warehouse reclassification journal and made sure everything was reclassed with the same expiry date.

    It does not seem to fix the issue. I still get the error that there are multiple expiry dates for the item. Also when I check availability by lot it still shows the 1 lot with no expiry date.

    I am trying to build a report to update all the lot expiry dates.

  • Suggested answer
    KasparsSemjonovs Profile Picture
    KasparsSemjonovs 3,962 Super User 2024 Season 2 on at
    RE: Multiple lot expiry date error

    Are You sure You reclassified all entries with that Lot No.

    Seems that You might added expiration date only to part of the Lot.

    Expiration dates needs to be adjusted for all items with the same Lot No. otherwise You can get stuck like now.

    Try to reclassify remaining items in Lot. to the same expiration date, or zero inventory for this Lot No. and then add it back in with correct expiration date.

  • Dimitri Kambas Profile Picture
    Dimitri Kambas 10 on at
    RE: Multiple lot expiry date error

    Hi Zhu yes I have tried this but it gives me the same error.

    The problem is that the inventory without expiry date is mixed in the same bin.

    I am using advanced warehousing so it’s the warehouse reclassification journal.

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 74,115 Super User 2024 Season 2 on at
    RE: Multiple lot expiry date error

    Hi, have you tried Item Reclass. Journal? Can it be posted?

    How to: Reclassify Lot Numbers and Serial Numbers
    https://learn.microsoft.com/en-us/previous-versions/dynamicsnav-2013r2/hh168055(v=nav.71)

    pastedimage1684454074536v1.png

    Hope this helps.

    Thanks.

    ZHU

  • Suggested answer
    Amit_Sharma Profile Picture
    Amit_Sharma 2,545 on at
    RE: Multiple lot expiry date error

    Hi,

    Refer the below website for learning D365 Functional & Technical :

    www.erpconsultors.com

    Regards

    Amit Sharma

    www.erpconsultors.com

    www.linkedin.com/.../

    Press Yes if info is useful.

  • Dimitri Kambas Profile Picture
    Dimitri Kambas 10 on at
    RE: Multiple lot expiry date error

    Okay thank you for the answer, it’s quite surprising that this needs dev to fix for such a small problem.

    What’s the best resource to learn how to do this with AL?

  • Suggested answer
    Amit_Sharma Profile Picture
    Amit_Sharma 2,545 on at
    RE: Multiple lot expiry date error

    Hi,

    Do one think update Expiration via AL code. Means develop one utility for updating Expiration Date directly in Posted Tables.

    This is not recommended. but this is the final

    Regards

    Amit Sharma

    www.erpconsultors.com

    www.linkedin.com/.../

    Press Yes if info is useful.

  • Dimitri Kambas Profile Picture
    Dimitri Kambas 10 on at
    RE: Multiple lot expiry date error

    Thanks for the response, I have tried the warehouse item journal and then item journal but when I try post it gives me the same error.

  • Suggested answer
    Amit_Sharma Profile Picture
    Amit_Sharma 2,545 on at
    RE: Multiple lot expiry date error

    Hi,

    This standard system error. You cannot assign multiple expiration in one lot.

    Do one thing, Negative entry via Item Journal and then post Positive entry via Item Journal with correct Expiration Date.

    Regards

    Amit Sharma

    www.erpconsultors.com

    https://www.linkedin.com/in/amit-sharma-94542440/

    Press Yes if info is useful

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans