ALAppExtensions
ALAppExtensions copied to clipboard
[Event Request] Table 83 Item Journal Line - field3 - OnValidate "OnValidateItemNoEntryTypeOutputBeforeCheckValueEntryType"
Can we please get the following events?
field(3; "Item No."; Code[20])
{
Caption = 'Item No.';
TableRelation = Item;
trigger OnValidate();
var
IsHandledL: Boolean;
begin
...
OnValidateItemNoOnAfterCalcUnitAmount(Rec, WorkCenter, MachineCenter);
case "Entry Type" of
"Entry Type"::Purchase:
"Unit of Measure Code" := Item."Purch. Unit of Measure";
"Entry Type"::Sale:
"Unit of Measure Code" := Item."Sales Unit of Measure";
"Entry Type"::Output:
begin
Item.TestField("Inventory Value Zero", false);
ProdOrderLine.SetFilterByReleasedOrderNo("Order No.");
ProdOrderLine.SetRange("Item No.", "Item No.");
if ProdOrderLine.FindFirst() then begin
"Routing No." := ProdOrderLine."Routing No.";
"Source Type" := "Source Type"::Item;
"Source No." := ProdOrderLine."Item No.";
end else begin
IsHandledL := false;
OnValidateItemNoEntryTypeOutputBeforeCheckValueEntryType(Rec, IsHandledL); <-- NEW EVENT
if not IsHandledL then begin
if ("Value Entry Type" <> "Value Entry Type"::Revaluation) and (CurrFieldNo <> 0) then
Error(Text031, "Item No.", "Order No.");
end;
end;
if ProdOrderLine.Count = 1 then
CopyFromProdOrderLine(ProdOrderLine)
else
if "Order Line No." <> 0 then begin
ProdOrderLine.SetRange("Line No.", "Order Line No.");
if ProdOrderLine.FindFirst() then
CopyFromProdOrderLine(ProdOrderLine)
else
"Unit of Measure Code" := Item."Base Unit of Measure";
end else
"Unit of Measure Code" := Item."Base Unit of Measure";
end;
"Entry Type"::Consumption:
if FindProdOrderComponent(ProdOrderComp) then
CopyFromProdOrderComp(ProdOrderComp)
else begin
"Unit of Measure Code" := Item."Base Unit of Measure";
Validate("Prod. Order Comp. Line No.", 0);
end;
end;
...
end;
}
[IntegrationEvent(false, false)]
local procedure OnValidateItemNoEntryTypeOutputBeforeCheckValueEntryType(ItemJournalLine: Record "Item Journal Line"; var IsHandled: Boolean)
begin
end;
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. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.