Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

How Invoice Post. Buffer Works

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi Everyone. 

I know Invoice Post. Buffer is use to create entries for G/L entries. Depending on the primary key of the Invoice Post. Buffer, entries get created.

I want to know how the system knows when to create a new entry? Do we need to specify the key to use? 

In the "PrepareSales(VAR SalesLine : Record "Sales Line")" function there no place specify how and when to create new entry. 

My actual requirement is to group item ledger entry based on Sell to Customer and Item No and then insert into a new table. My idea is to use a same way of Invoice Post. Buffer. 

*This post is locked for comments

  • Jens Glathe Profile Picture
    Jens Glathe 6,092 on at
    RE: How Invoice Post. Buffer Works

    Hi Nareshwar,

    well, no. It is not that hard for an exerienced developer to do this. If Microsoft would integrate it as standard functionality, that would be another matter, but they are interested in other things lately.

    with best regards

    Jens

  • RE: How Invoice Post. Buffer Works

    Hi Jens,

    Thank you for the input. Can you share your SingleLineID to the public? Maybe a blog post would do.

  • Suggested answer
    Jens Glathe Profile Picture
    Jens Glathe 6,092 on at
    RE: How Invoice Post. Buffer Works

    Hi,

    PrepareSales() for instance fills in the fields of the Invoice Posting Buffer. As Amol said, when the record is tried to be inserted into the temporary table, the system checks the fields according to the primary key of the table (as always). If the primary key already exists, the record is not inserted. So... if you want a ditinction by another field (ex: Description), you need to ad this field to the primary key of T49. But, caution with this: The primary key is quite long already, it can only contain 16 fields. Because of this, "we" (plexada.com) have developed a small logic called SigleLineID which solves this issue. You can basically add as many fields as you like to the "distinct" list, and it works since 2010. It is part of our BuildingBlocks AddOn.

    with best regards

    Jens

  • Suggested answer
    Amol Salvi Profile Picture
    Amol Salvi 18,694 on at
    RE: How Invoice Post. Buffer Works

    Hi,

    When record getting inserted based on primary key then system checks wheteher the record exist in table and if not then it will insert the record.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How Invoice Post. Buffer Works

    Thank you for trying to help me. But I really appreciate if you can read my question again. I know what you mention and my question is how the code get to know about the table key when there is no code about it.  

  • Rajasekhar@MS Profile Picture
    Rajasekhar@MS 5,567 on at
    RE: How Invoice Post. Buffer Works

    The Invoice Post. Buffer Group" the GL entries, grouped by Type,G/L Account,Gen. Bus. Posting Group,Gen. Prod. Posting Group,VAT Bus. Posting Group,VAT Prod. Posting Group,Tax Area Code,Tax Group Code,Tax Liable,Use Tax,Dimension Entry No.,Job No.,Fixed Asset Line No. i.e by the key.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How Invoice Post. Buffer Works

    I checked.

         IF (SalesLine.Type >= SalesLine.Type::"G/L Account") AND (SalesLine."Qty. to Invoice" <> 0) THEN BEGIN

           AdjustPrepmtAmountLCY(SalesLine);

           // Copy sales to buffer

           FillInvPostingBuffer(SalesLine,SalesLineACY);

  • Rajasekhar@MS Profile Picture
    Rajasekhar@MS 5,567 on at
    RE: How Invoice Post. Buffer Works

    Hi

    Have you checked where the FillInvPostingBuffer function used in codeunit 80 or you have only checked the function only.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How Invoice Post. Buffer Works

    Hi,

    FillInvPostingBuffer call PrepareSales functions. That is it, it does not say when to create the new line. I want to know how the system knows when to create the new line based on the primary key.

    Example, if we want to create G/L entries base on sales line description then we only need to alter the primary key of the Invoice Post. Buffer table. Then system will start to create entries based on the new primary key.

    I want to know how the system know it?

  • Rajasekhar@MS Profile Picture
    Rajasekhar@MS 5,567 on at
    RE: How Invoice Post. Buffer Works

    Hi

    Yu can have a look in the Codeunit 80, FillInvPostingBuffer function.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans