web
You’re offline. This is a read only version of the page.
close
Skip to main content
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 2,926
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
    60,969 Super User 2025 Season 2 on at
    "Sales Invoice Header" Table
    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,692 Moderator on at
    "Sales Invoice Header" Table
    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
    12,138 Super User 2025 Season 2 on at
    "Sales Invoice Header" Table
    Hello
     
    Yes Both the Tables are different.
     
    Sales Invoice Header - 112
    Sales Credit Memo Header - 114
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    19,166 Super User 2025 Season 2 on at
  • Suggested answer
    Ramesh Kumar Profile Picture
    7,511 Super User 2025 Season 2 on at
    "Sales Invoice Header" Table

    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,209 Super User 2025 Season 2 on at
    "Sales Invoice Header" Table
    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
    93,024 Super User 2025 Season 2 on at
    "Sales Invoice Header" Table
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 3,808

#2
Sumit Singh Profile Picture

Sumit Singh 2,554

#3
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 2,140

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans