-
Notifications
You must be signed in to change notification settings - Fork 692
Open
Labels
missing-infoThe issue misses information that prevents it from completion.The issue misses information that prevents it from completion.
Description
Why do you need this change?
We need skip standard strmenu, bucause we use this codeunit during API actions. It means we have to skip all users interactive parts. This event allow us skip selecetion menu and provide default selection set in setups or provided by API.
New event doesn't skip another events so this not change behavior for another extensions.
Describe the request
trigger OnRun()
var
PhysInvtOrderHeader: Record "Phys. Invt. Order Header";
PhysInvtOrderLine: Record "Phys. Invt. Order Line";
Selection: Integer;
//-----------------------------OnRunOnBeforeSelectSelection:BEGIN
IsHandled: Boolean;
//-----------------------------OnRunOnBeforeSelectSelection:END
begin
PhysInvtOrderHeader.Copy(Rec);
//-----------------------------OnRunOnBeforeSelectSelection:BEGIN
IsHandled := false;
OnRunOnBeforeSelectSelection(Selection, IsHandled);
if not IsHandled then
//-----------------------------OnRunOnBeforeSelectSelection:END
Selection := StrMenu(SelectionQst, 1);
if Selection = 0 then
exit;
PhysInvtOrderLine.Reset();
PhysInvtOrderLine.SetRange("Document No.", PhysInvtOrderHeader."No.");
if PhysInvtOrderLine.Find('-') then
repeat
if (Selection = 1) or
((Selection = 2) and not PhysInvtOrderLine."Qty. Exp. Calculated")
then
if not PhysInvtOrderLine.EmptyLine() then begin
PhysInvtOrderLine.TestField("Item No.");
PhysInvtOrderLine.CalcQtyAndTrackLinesExpected();
PhysInvtOrderLine.Modify();
end;
until PhysInvtOrderLine.Next() = 0;
Rec := PhysInvtOrderHeader;
end;
var
SelectionQst: Label 'All Order Lines,Only Not Calculated Lines';
//-----------------------------OnRunOnBeforeSelectSelection:BEGIN
[IntegrationEvent(false, false)]
local procedure OnRunOnBeforeSelectSelection(var Selection: Integer; var IsHandled: Boolean)
begin
end;
//-----------------------------OnRunOnBeforeSelectSelection:ENDReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
missing-infoThe issue misses information that prevents it from completion.The issue misses information that prevents it from completion.