[Event Request] Codeunit 333 Issue 1339 Not Completely Implemented
According to #1339 (shipped) I should find new events to extend the document grouping by customized fields in D365BC RTM. But some are still missing:
Function Code
[...]
SETCURRENTKEY(
"Worksheet Template Name","Journal Batch Name","Vendor No.",
"Sell-to Customer No.","Ship-to Code","Order Address Code","Currency Code",
"Ref. Order Type","Ref. Order Status","Ref. Order No.",
"Location Code","Transfer-from Code","Purchasing Code");
// >> NEW
OnBeforeFindReqLines(VAR ReqLine);
// << NEW
IF FIND('-') THEN
[...]
From https://github.com/Microsoft/AL/issues/1339#issuecomment-361897790 (Jan 31)
- Function Code (end) Code refactoring for new event OnCheckNewNameNecessary
Function InsertPurchOrderLine (with event and refactoring suggestion) is also missing.
FinalizeOrderHeader
[...]
ReqLine2.SETRANGE("Purchasing Code",PrevPurchCode);
ReqLine2.SETFILTER("Line No.",'..%1',ReqLine."Line No.");
// >> NEW
OnBeforeFindReqLine2(VAR ReqLine2);
// << NEW
IF ReqLine2.FIND('-') THEN BEGIN
[...]
CheckInsertFinalizePurchaseOrderHeader
LOCAL CheckInsertFinalizePurchaseOrderHeader(RequisitionLine : Record "Requisition Line";VAR PurchOrderHeader : Record "Purchase Header";UpdateAddressDetails : Boolean) Result : Boolean
WITH RequisitionLine DO
Result :=
(PurchOrderHeader."Buy-from Vendor No." <> "Vendor No.") OR
(PurchOrderHeader."Sell-to Customer No." <> "Sell-to Customer No.") OR
(PrevShipToCode <> "Ship-to Code") OR
(PurchOrderHeader."Order Address Code" <> "Order Address Code") OR
(PurchOrderHeader."Currency Code" <> "Currency Code") OR
(PrevPurchCode <> "Purchasing Code") OR
(PrevLocationCode <> "Location Code") OR
CheckAddressDetails("Sales Order No.","Sales Order Line No.",UpdateAddressDetails);
// >> NEW
OnAfterCheckInsertFinalizePurchaseOrderHeader(PurchOrderHeader,RequisitionLine,VAR Result);
// << NEW
@thpeder any news on this?
This event request was rejected due to the need for extensive refactoring. Moving to ALAppExtensions repo for further tracking.
Hello,
is here something new? We also have the Event Request OnBeforeFindReqLines to change the existing Keys (post 1) and FinalizeOrderHeader (post 3).
Post 4 seems to be solved.
@SKeiler
OnBeforeFindReqLines has been solved in 14.05 using OnBeforeSetReqLineSortingKey:

FinalizeOrderHeader is also solved, using OnFinalizeOrderHeaderOnAfterSetFiltersForNonRecurringReqLine

@AlexanderYakunin The last open issue is this request part:
Function InsertPurchOrderLine
What is the current state?
Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.
Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.