web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

How to post new added field in Sales Journal to Customer Ledger

(0) ShareShare
ReportReport
Posted on by 22
I have added 2 new fields in Sales Journal. But in Post those are not passing to Customer Ledger. I have created same fields in Customer Ledger too. How can I post the values of 2 new fields? 
  • Suggested answer
    Gerardo Rentería García Profile Picture
    27,623 Super User 2026 Season 2 on at

    Hi 

    You have to subscribe to this event.

    And here pass the values from General Journal Line to Customer Ledger Entry.

    Best Regards

    Gerardo

  • Suggested answer
    YUN ZHU Profile Picture
    103,672 Super User 2026 Season 2 on at
    Hi, hope the following helps.
    tableextension 50119 MyExtension extends "Gen. Journal Line"
    {
        fields
        {
            field(50100; ZYTest; Text[100])
            {
                Caption = 'ZY Test';
                DataClassification = CustomerContent;
            }
        }
    }
    
    pageextension 50121 CustomerLedgerEntriesExt extends "Customer Ledger Entries"
    {
        layout
        {
            addafter("Document No.")
            {
                field(ZYTest; Rec.ZYTest)
                {
                    ApplicationArea = All;
                }
            }
        }
    }
    
    tableextension 50121 CustLedgerEntryExt extends "Cust. Ledger Entry"
    {
        fields
        {
            field(50100; ZYTest; Text[100])
            {
                Caption = 'ZY Test';
                DataClassification = CustomerContent;
            }
        }
    }
    
    codeunit 50116 CcBccHandle
    {
        [EventSubscriber(ObjectType::Codeunit, Codeunit::"Gen. Jnl.-Post Line", OnAfterInitCustLedgEntry, '', false, false)]
        local procedure OnAfterInitCustLedgEntry(var CustLedgerEntry: Record "Cust. Ledger Entry"; GenJournalLine: Record "Gen. Journal Line"; var GLRegister: Record "G/L Register");
        begin
            CustLedgerEntry.ZYTest := GenJournalLine.ZYTest;
        end;
    }
    Test:
     
    Thanks.
    ZHU
  • Suggested answer
    Dustin Wolf Profile Picture
    30 on at
    Hello

    I would use the function CopyFromGenJnlLine from the Cust. Ledger Entry Table



    Just create a subscriber, hooking on to this function and adding the code to add new fields here.

    - Dustin Wolf
    ​​​​​​​Accent Software

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 753 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 583 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 302 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans