Hi,
Need to show item and GL description from posted purchase invoice page to Posted purchase invoices list page.
pageextension 50102 PurchaseItemDescription extends "Posted Purchase Invoices"
{
layout
{
addbefore("Currency Code")
{
field(ItemName; ItemName)
{
ApplicationArea = All;
Caption = 'Item Name';
}
}
}
trigger OnAfterGetRecord()
var
PurchInvLine: Record "Purch. Inv. Line";
begin
PurchInvLine.Reset();
PurchInvLine.SetRange("Document No.", Rec."No.");
PurchInvLine.SetRange(Type, PurchInvLine.Type::Item);
if PurchInvLine.FindSet() then begin
ItemName := PurchInvLine.Description
end
else
ItemName := '';
end;
var
ItemName: Text;
}
If i run the above code, I can able to show item description in posted purchase invoices list page.
I also need to show GL type description, so i added the code as:
PurchInvLine.SetRange(Type, PurchInvLine.Type::"G/L Account");
The above screenshot showing only GL Type description. But i want to show both item and GL Type description. How to set filter or range to show both item and GL Type description?