Skip to main content

Notifications

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

Bin does not show as Empty (boolean field) even though there is nothing in Bin Contents for it

Posted on by 48
Hello,
 
I'm curious about why this happens.
 
I have a bunch of bins for which this is happening. Here is an example :
 
 
However when going into the Contents of the one selected, there are no lines :
 
Could anyone shed some light on this ?
 
Thank you,
Fares
  • Fares Profile Picture
    Fares 48 on at
    Bin does not show as Empty (boolean field) even though there is nothing in Bin Contents for it
    Hello,
     
    Sorry for the delay, I had forgotten that I posted here until the issue surface again.
     
    I just checked the value of the Empty boolean against Warehouse Entries and was unable to correlate.
     
    For example, R16 is not shown as Empty while R17 is :
     
     
    Both have no actual content :
     
     
    And both have no Warehouse Entries :
     
     
     
    Thank you again for the help,
    Fares
  • Jun Wang Profile Picture
    Jun Wang 7,377 Super User 2024 Season 2 on at
    Bin does not show as Empty (boolean field) even though there is nothing in Bin Contents for it
    there are primarily two reasons to this. first, users need to assign an item to a bin as fixed or default, or both if you like. in the below screen w010002 shows as empty and there is no qty of item there. 
     
     
     
    the other bin w020001 doesn't have empty set to yes, so user may assume it has content. But actually, it doesn't.
     
     
    it may seem strange, but if you check the warehouse entries
     
    there is no entry for that bin so I think that should be the reason. If transactions have been done to the bin for that item, BC will set Empty to Yes if that item is emptied from the bin. you could test this out. 
    hope this helps.
     
    if you have further questions, you could either drop it here or shoot me a message on linkedin
     
  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 58,880 Super User 2024 Season 2 on at
    Bin does not show as Empty (boolean field) even though there is nothing in Bin Contents for it
    Empty field is calculated based on the Warehouse Entry table and NOT Bin Content table.
     
        local procedure UpdateBinEmpty(NewWarehouseEntry: Record "Warehouse Entry")
        var
            WarehouseEntry: Record "Warehouse Entry";
            IsHandled: Boolean;
        begin
            OnBeforeUpdateBinEmpty(NewWarehouseEntry, Bin, IsHandled);
            if IsHandled then
                exit;
    
            if NewWarehouseEntry.Quantity > 0 then
                ModifyBinEmpty(false)
            else begin
                WarehouseEntry.SetCurrentKey("Bin Code", "Location Code");
                WarehouseEntry.SetRange("Bin Code", NewWarehouseEntry."Bin Code");
                WarehouseEntry.SetRange("Location Code", NewWarehouseEntry."Location Code");
                WarehouseEntry.CalcSums("Qty. (Base)");
                ModifyBinEmpty(WarehouseEntry."Qty. (Base)" = 0);
     

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,900 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,275 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans