Hi,
I have the following code to extend the item page to display the last purchased date, it works fine:
My question is what is the easiest way for this field to also be available to the 'Purchased Line (39)' Table so I can display it on the Purchase Order Subform (54, ListPart) when creating a purchase order without having to go to the item page...
tableextension 53023 "Item Extension last purchased" extends Item
{
fields
{
field(53023; "Last Purchase Date"; Date)
{
Caption = 'Last Purchase Date';
FieldClass = FlowField;
CalcFormula = Max("Item Ledger Entry"."Posting Date" WHERE ("Item No." = FIELD("No."),
"Entry Type" = FILTER(Purchase),
Quantity = FILTER(>0)));
}
}
}
pageextension 53023 "Item Card Extension Purchased" extends "Item Card"
{
layout
{
addlast(Item)
{
field("Last Purchase Date"; Rec."Last Purchase Date")
{
ApplicationArea = All;
Caption = 'Last Purchase Date';
}
}
}
}