Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

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

Posted on by 13
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
  • FT-06051808-0 Profile Picture
    FT-06051808-0 13 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 5,659 Super User 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 51,686 Super User 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);
     

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,584 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,864 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans