Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Event Request] Codeunit 7301 "Whse. Jnl.-Register Line". UpdateBinEmpty #27698

Open
fridrichovsky opened this issue Nov 26, 2024 · 0 comments
Open
Labels
event-request Request for adding an event SCM GitHub request for SCM area

Comments

@fridrichovsky
Copy link
Contributor

fridrichovsky commented Nov 26, 2024

Describe the request

Please add new event

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.ReadIsolation(IsolationLevel::ReadUnCommitted);
    WarehouseEntry.SetRange("Bin Code", NewWarehouseEntry."Bin Code");
    WarehouseEntry.SetRange("Location Code", NewWarehouseEntry."Location Code");
    WarehouseEntry.CalcSums("Qty. (Base)");
    ModifyBinEmpty(WarehouseEntry."Qty. (Base)" = 0);
  end;
  //------------------------------------------------OnAfterUpdateBinEmpty:BEGIN
  OnAfterUpdateBinEmpty(NewWarehouseEntry, Bin)
  //------------------------------------------------OnAfterUpdateBinEmpty:END
end;

//------------------------------------------------OnAfterUpdateBinEmpty:BEGIN
[IntegrationEvent(true, false)]
local procedure OnAfterUpdateBinEmpty(NewWarehouseEntry: Record "Warehouse Entry"; Bin: Record Bin)
begin
end;
//------------------------------------------------OnAfterUpdateBinEmpty:END

Additional context

We need our code after mentioned function
Internal work item: AB#558857

@ChethanT ChethanT added event-request Request for adding an event SCM GitHub request for SCM area labels Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
event-request Request for adding an event SCM GitHub request for SCM area
Projects
None yet
Development

No branches or pull requests

2 participants