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 :
Microsoft Dynamics NAV (Archived)

Inserting field to G/L Entry

(0) ShareShare
ReportReport
Posted on by 28

Hi,

I'm trying to post Sales order and I want one of the fields in sales order posted to the G/L entry. I don't see reference for the General Journal Line table (in PostGLAndCustomer function) in codeunit 80 to assign that field value from sales order table. How can we assign sales order field value to the general journal line field?

*This post is locked for comments

I have the same question (0)
  • I Gusti Made Ari Profile Picture
    3,608 on at

    You need to subscribe to table 81 to function "OnAfterCopyGenJnlLineFromSalesHeader(SalesHeader,Rec);"

  • manideep22 Profile Picture
    28 on at

    I don't have event type OnAfterCopyGenJnlLineFromSalesHeader inside table 81. Is there an alternative?

  • Teddy Herryanto (That NAV Guy) Profile Picture
    14,302 Super User 2026 Season 1 on at

    There is a CopyFromSalesHeader function in table 81

  • manideep22 Profile Picture
    28 on at

    Where can I use CopyFromSalesHeader to assign a field from Sales header to General Journal line?

  • Verified answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    14,302 Super User 2026 Season 1 on at

    You can add your code inside the CopyFromSalesHeader function.

  • manideep22 Profile Picture
    28 on at

    I have added GenJnlLine.OriginalDocNo := SalesHeader.OriginalDocNo inside the function but I still see the Original Doc No as blank in G/L entry.

  • manideep22 Profile Picture
    28 on at

    It worked. Thank 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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans