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

Copy Line [Description 2] to G/L Entry [Comment] field

(0) ShareShare
ReportReport
Posted on by 905

I've had a request and I'm not sure if it's possible in BC.

Can the value in field: Description 2 (12, Text[50]) of an Invoice Line (Table: 37) with Type: G/L Account be carried to field: Comment (5618, Text[250]) of table: G/L Entry (17) during a Post?

Is this configurable in BC or would it require a custom AL extension?

I have the same question (0)
  • Suggested answer
    DAnny3211 Profile Picture
    11,407 Super User 2026 Season 1 on at

    Hi

    requires the development of a custom AL extension

    DAniele

  • Suggested answer
    Shathika Karunaratne Profile Picture
    6 on at

    Hi,

    Yes, have to do a customization. below are the events that you need to trigger

    [EventSubscriber(ObjectType::Table, 81, 'OnAfterCopyGenJnlLineFromSalesHeader', '', true, true)]

    local procedure OnAfterCopyGenJnlLineFromSalesHeader(SalesHeader: Record "Sales Header"; VAR GenJournalLine: Record "Gen. Journal Line")

    [EventSubscriber(ObjectType::Table, 17, 'OnAfterCopyGLEntryFromGenJnlLine', '', true, true)]

    local procedure OnAfterCopyGLEntryFromGenJnlLine(VAR GLEntry: Record "G/L Entry"; VAR GenJournalLine: Record "Gen. Journal Line")

    Thanks

  • Nick Webb Profile Picture
    905 on at

    Thanks for the tip on the events. Just checking, this hooks me into the Sales Header when I want the Sales Line(s). Is there an event for that or do I need to get the detail lines from the Sales Header in the events you've provided?

  • Suggested answer
    Shathika Karunaratne Profile Picture
    6 on at

    Hi,

    Yes you can filter the particular Sales Line via Document No. and Document Type

    Sales Line. Document No=Sales Header.No.

    Sales Line. Document Type=Sales Header.Document Type

    Thanks

  • Nick Webb Profile Picture
    905 on at

    Thanks for your help. I have one last question if I may, for future reference: How did you zoom in on which events to subscribe to. I tried using the Event Recorder in BC and it returned over 300 event calls. I Started just before a Sales Invoice Post and stopped straight after. Is there a better way of drilling down to the relevant event or events?

  • Suggested answer
    Shathika Karunaratne Profile Picture
    6 on at

    Put debugger and put break point to the Post action. Then you can move ahead one by one line and read them.

    Thanks

    Please do verify if it helps you

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,958 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,101 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 959 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans