ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event (Change) Request] Table 5406 Prod. Order Line, Item No. - OnValidate

Open IngoStender opened this issue 7 years ago • 0 comments

Please add the parameter xrec to the exsting publisher OnAfterCopyFromItem in Item No. - OnValidate(). Our solution has some additional code that is only valid if the item no. is changed.

  [...]
  "Unit Cost" := Item."Unit Cost";
  "Indirect Cost %" := Item."Indirect Cost %";
  "Overhead Rate" := Item."Overhead Rate";
  IF "Item No." <> xRec."Item No." THEN BEGIN
    VALIDATE("Production BOM No.",Item."Production BOM No.");
    VALIDATE("Routing No.",Item."Routing No.");
    VALIDATE("Unit of Measure Code",Item."Base Unit of Measure");
  END;
- OnAfterCopyFromItem(Rec,Item);
+ OnAfterCopyFromItem(Rec,xRec,Item);
  IF ProdOrder."Source Type" = ProdOrder."Source Type"::Family THEN
    "Routing Reference No." := 0
  ELSE
  [...]

- LOCAL [IntegrationEvent] 
  OnAfterCopyFromItem(VAR ProdOrderLine : Record "Prod. Order Line";Item : Record Item)

+ LOCAL [IntegrationEvent] 
  OnAfterCopyFromItem(VAR ProdOrderLine : Record "Prod. Order Line";xProdOrderLine : Record "Prod. Order Line";Item : Record Item)

IngoStender avatar Mar 27 '19 15:03 IngoStender