Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

preventing negative inventory in NAV 2013

Posted on by 2

Hello Everyone,
Greetings!
I need some ideas on how to prevent negative inventory in NAV 2013.It's easy in other versions but How can I customize the objects in NAV 2013 to prevent negative inventory?
Any kind of help will be appreciated.
Thanks In Advance

*This post is locked for comments

  • Harsha Kumara Profile Picture
    Harsha Kumara 25 on at
    RE: preventing negative inventory in NAV 2013

    Tnx for the reply

  • Sulav Thapaliya Profile Picture
    Sulav Thapaliya 2 on at
    RE: preventing negative inventory in NAV 2013

    Thank You Sir

  • Verified answer
    TharangaC Profile Picture
    TharangaC 23,116 on at
    RE: preventing negative inventory in NAV 2013

    Versions which came before 2013 R2 does not have the option to block the negative inventory using a setup and you required to do a small modifications to the "Item Jnl.-Post Line" code unit. As Vishal mention in the code unit go to the InsertItemLedgEntry function and in that add two lines.

    IF (ItemLedgEntry.Quantity < 0) THEN
        ERROR(Text005,ItemLedgEntry."Item No.");
    

    save and compile. You are ready to go.

    With-Code.JPG

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: preventing negative inventory in NAV 2013

    You can add following lines in CU 22 > InsertItemLedgEntry function to achieve this.

    //Existing Code

     IF ItemLedgEntry.Open THEN BEGIN

       IF (((ItemLedgEntry."Entry Type" IN

         [ItemLedgEntry."Entry Type"::"Negative Adjmt.",

         ItemLedgEntry."Entry Type"::Consumption]) AND

         ("Source Type" = "Source Type"::Item)) OR

         (ItemLedgEntry."Entry Type" = ItemLedgEntry."Entry Type"::Transfer)) AND

         (ItemLedgEntry.Quantity < 0)

       THEN

         ERROR(Text005,ItemLedgEntry."Item No.");

    // Add following two lines

       IF   (ItemLedgEntry.Quantity < 0)  THEN

         ERROR(Text005,ItemLedgEntry."Item No.");

    This will prevent the posting of Negative Inventory and will take care all the conditions and also would not impact any system performance.

  • Suggested answer
    keoma Profile Picture
    keoma 32,675 on at
    RE: preventing negative inventory in NAV 2013

    in nav 2013 (r1, 7.0) that needs a customization. for that please contact your nav partner.

    this feature is available in nav standard with vs. >= 2013 r2.

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 Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans