To Disable transactions with Negative Stock

BeatriceBeatrice Member Posts: 346
Hi,

Our client is working on NAV 4.0 SP1.

They are actually being able to process transactions though stock is negative.

They want to disable this functionality, that is, the system should not allow users to process transactions when stock quantity is zero.

Can someone please advise urgently?

Thanks and Regards,
Beatrice.

Comments

  • NikkNikk Member Posts: 49
    You can achieve this with code ...its how we have done it at a clients....
  • ssinglassingla Member Posts: 2,973
    Bin Management and to some extend item tracking stops the negative transaction by default else you need to write code.
    CA Sandeep Singla
    http://ssdynamics.co.in
  • nunomaianunomaia Member Posts: 1,153
    Where you want to disable negative item posting?
    Nuno Maia

    Freelance Dynamics AX
    Blog : http://axnmaia.wordpress.com/
  • BeatriceBeatrice Member Posts: 346
    Thanks for replying.

    So this is not a standard feature in Navision.
    Where you want to disable negative item posting?

    The client wants the system to prevent users from making any outbound transactions (transfer shipments, negative adjustments, sales shipment, etc.) which will result in negative stock.

    Thanks and Regards,
    Beatrice.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    Beatrice wrote:
    Hi,

    Our client is working on NAV 4.0 SP1.

    They are actually being able to process transactions though stock is negative.

    They want to disable this functionality, that is, the system should not allow users to process transactions when stock quantity is zero.

    Can someone please advise urgently?

    Thanks and Regards,
    Beatrice.
    You would need to add code to CU22, as described in this thread here.
    David Singleton
  • BeatriceBeatrice Member Posts: 346
    Thanks for the code.

    The problem is that I am not a technical person, I went on the Design of CodeUnit 22: Item Jnl.-Post Line, but under which tab should I add this Code?

    Thanks and Regards,
    Beatrice.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    Beatrice wrote:
    Thanks for the code.

    The problem is that I am not a technical person, I went on the Design of CodeUnit 22: Item Jnl.-Post Line, but under which tab should I add this Code?

    Thanks and Regards,
    Beatrice.

    Well if you are not 100% sure, then maybe this is a better job for your developers. I am not sure I really want to guide you through modifying CU22 in a forum, since it can cause damage if you are not comfortable modifying core code units.
    David Singleton
  • BeatriceBeatrice Member Posts: 346
    OK, thanks for the Code.

    I will see this with a developer.

    So to conclude you think that by adding this code it will prevent users from posting any outbound transactions when Quantity on Stock is zero.

    Thanks very much.

    Regards,
    Beatrice.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    Beatrice wrote:
    OK, thanks for the Code.

    I will see this with a developer.

    So to conclude you think that by adding this code it will prevent users from posting any outbound transactions when Quantity on Stock is zero.

    Thanks very much.

    Regards,
    Beatrice.

    Sorry, I am just really nervous helping someone inside any of the x2 codeunits. They really are the core of Navision.

    But yes you are correct, basically what you are saying to Navision is that it must not insert or modify an Item ledger entry if the Remaining Qty is negative.

    As an extension to this, I often will add a tick box to the Location table or the Inventory Setup table that says to only make this test for certain locations.

    PS since its going to a developer, ....

    The first point to modify, is in Trigger:
    InsertItemLedgEntry(VAR ItemLedgEntry : Record "Item Ledger Entry";TransferItem : Boolean)
    
    just before the ItemLedgEntry.INSERT; command.

    The second is the
    ApplyItemLedgEntry(VAR ItemLedgEntry : Record "Item Ledger Entry";VAR OldItemLedgEntry : Record "Item Ledger Entry";VAR ValueEntry : Re
    
    just before the OldItemLedgEntry.MODIFY; command.
    David Singleton
  • themavethemave Member Posts: 1,058
    Beatrice wrote:
    Thanks for replying.

    So this is not a standard feature in Navision.
    Where you want to disable negative item posting?

    The client wants the system to prevent users from making any outbound transactions (transfer shipments, negative adjustments, sales shipment, etc.) which will result in negative stock.

    Thanks and Regards,
    Beatrice.
    Just for your information, Transfers already have this functionality built in, you can not transfer an item you don't have in stock. If you want to learn more of the underlying programming, start there.
Sign In or Register to comment.