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...
Answered

"Sales Invoice Header" Table

(3) ShareShare
ReportReport
Posted on by 3,549
Hi:
 
When reporting on data in the Sales Invoice Header table (112), how do you exclude credit memos?
 
John
I have the same question (0)
  • Suggested answer
    Mohana Yadav Profile Picture
    61,204 Super User 2026 Season 1 on at
    Credit memos will be in a different table called "Sales Cr.Memo Header"
    why did you think that Sales Invoice Header table has credit memos?
  • Suggested answer
    Nitin Verma Profile Picture
    21,794 Moderator on at
    Hi,
    If you're building a custom report in AL, you can explicitly filter the Sales Invoice Header table and related data. Example:
    procedure GetSalesInvoicesExcludingCreditMemos()
    var
        SalesInvoiceHeader: Record "Sales Invoice Header";
    begin
        SalesInvoiceHeader.SETRANGE("Cancelled", false); // Exclude canceled invoices
        SalesInvoiceHeader.SETRANGE("Closed", false);    // Exclude fully applied/closed invoices
        if SalesInvoiceHeader.FINDSET then
            repeat
                // Process your sales invoice data here
            until SalesInvoiceHeader.NEXT = 0;
    end;
    Check this code if it works for you.
  • Suggested answer
    Jainam M. Kothari Profile Picture
    15,803 Super User 2026 Season 1 on at
    Hello
     
    Yes Both the Tables are different.
     
    Sales Invoice Header - 112
    Sales Credit Memo Header - 114
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    22,130 Super User 2026 Season 1 on at
  • Suggested answer
    Ramesh Kumar Profile Picture
    7,547 Super User 2026 Season 1 on at

    Hi,

    You can use the filter option or exclude negative amounts to refine the data. However, does this apply to the Sales Invoice Header?

    Also, the Sales Cr. Memo Header table number is different from the Sales Invoice Header—I believe they are 112 and 114, respectively.

     

    Thanks! Ramesh

     

    If this helped you, please check the box Does this answer your question?

     

     
     
  • Verified answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    14,302 Super User 2026 Season 1 on at
    The Invoice and Credit have different tables.
     
    Sales Invoice Header - 112
    Sales Credit Memo Header - 114
     
    If you want to exclude a cancelled invoice, you can filter out the Cancelled field.
     
    SalesInvoiceHeader.SetRange(Cancelled, false);
  • Suggested answer
    YUN ZHU Profile Picture
    99,086 Super User 2026 Season 1 on at
    If you only want the Header, you can also use Cust. Ledger Entry (21).
     
    Hope this helps as well.
    Thanks.
    ZHU

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,993 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,116 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 557 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans