Dear all,
Am trying to bring Customer Name from Cust. Ledger Entry (21) to the Detailed Cust. Ledg. Entry (379). Right now only customer num is available in Detailed Customer Ledger Entry Page.
but am stuck in the code, pls correct if am doing wrong
pageextension 60022 "CusName DetailCustLed Entry" extends "Detailed Cust. Ledg. Entries"
{
layout
{
addafter("Customer No.")
{
field("Customer Name"; CustomerName)
{
ApplicationArea = All;
Caption = 'Customer Name';
}
}
}
TRIGGER OnAfterGetRecord();
BEGIN
clear(CustomerName);
IF Rec."Entry No." = Rec."​Cust. Ledger Entry No."::"Cust. Ledger Entry" THEN BEGIN
TempCustLedEntry.RESET;
TempCustLedEntry.DELETEALL;
DetailedCustomerLedgerEntries.GetGLEntries(Rec, TempCustLedEntry);
TempCustLedEntry.findfirst;
CustomerName := TempCustLedEntry."Customer Name";
END;
END;
var
CustomerName: Code[50];
TempCustLedEntry: Record "Cust. Ledger Entry" temporary;
DetailedCustomerLedgerEntries: Codeunit DetailedCustomerLedgerEntries;
}