ALAppExtensions
ALAppExtensions copied to clipboard
[Event Request] Codeunit 7322 "Create Inventory Pick/Movement" - GetSourceDocHeader
Could we please have an Event in Codeunit 7322 function GetSourceHeader to create a Case-ELSE Structure?
Code:
local procedure GetSourceDocHeader()
begin
case WhseRequest."Source Document" of
WhseRequest."Source Document"::"Purchase Order":
begin
PurchHeader.Get(PurchHeader."Document Type"::Order, WhseRequest."Source No.");
PostingDate := PurchHeader."Posting Date";
VendorDocNo := PurchHeader."Vendor Invoice No.";
end;
WhseRequest."Source Document"::"Purchase Return Order":
begin
PurchHeader.Get(PurchHeader."Document Type"::"Return Order", WhseRequest."Source No.");
PostingDate := PurchHeader."Posting Date";
VendorDocNo := PurchHeader."Vendor Cr. Memo No.";
end;
WhseRequest."Source Document"::"Sales Order":
begin
SalesHeader.Get(SalesHeader."Document Type"::Order, WhseRequest."Source No.");
PostingDate := SalesHeader."Posting Date";
end;
WhseRequest."Source Document"::"Sales Return Order":
begin
SalesHeader.Get(SalesHeader."Document Type"::"Return Order", WhseRequest."Source No.");
PostingDate := SalesHeader."Posting Date";
end;
WhseRequest."Source Document"::"Outbound Transfer":
begin
TransferHeader.Get(WhseRequest."Source No.");
PostingDate := TransferHeader."Posting Date";
end;
WhseRequest."Source Document"::"Prod. Consumption":
begin
ProdHeader.Get(WhseRequest."Source Subtype", WhseRequest."Source No.");
PostingDate := WorkDate;
end;
WhseRequest."Source Document"::"Assembly Consumption":
begin
AssemblyHeader.Get(WhseRequest."Source Subtype", WhseRequest."Source No.");
PostingDate := AssemblyHeader."Posting Date";
end;
**// start kvspsa - Event Raiser
else
OnWhseRequestGetSourceDocHeaderCaseElse(WhseRequest, PostingDate);
// stop kvspsa**
end;
end;
This event already exist OnGetSourceDocHeaderFromWhseRequest(WhseRequest, SourceDocRecRef, PostingDate, VendorDocNo);
Hi Alexander, we can't find it in CU02, will it be available in CU03?
Michael
Yes