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

Purchase Invoice API Issue: Total Amounts Zero with G/L Account

(1) ShareShare
ReportReport
Posted on by 7

Hi Community,

I'm facing an issue while creating a purchase invoice with a G/L Account selected in the purchase invoice line. When I use the GET API for the purchase invoice, the following properties return a value of 0:

  • totalAmountExcludingTax
  • totalTaxAmount
  • totalAmountIncludingTax

Could you please let me know if I need to set up any changes or if there is another way to get the correct values for these properties through the API?

Thank you!

 
PurchaseInvoiceAP...

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

I have the same question (0)
  • Mohana Yadav Profile Picture
    61,208 Super User 2026 Season 1 on at
    Are you using standard API or custom?
     
    I could not see your attachment for some reason, Please paste directly in the chat.
  • Gerardo Rentería García Profile Picture
    26,091 Most Valuable Professional on at
    Hi
    Do you have amounts in the document lines?
    BR
    GR
  • CU25061419-0 Profile Picture
    on at
    This value might be calculated at runtime, which is why it is showing up zero.

    Can you run RecordName.CalcFields('field name') and see if it populates the value.

    Sources: Record.CalcFields(Any [, Any,...]) Method - Business Central | Microsoft Learn
  • BS-27061404-0 Profile Picture
    7 on at

    I'm using the standard API: https://{businesscentralPrefix}/api/v2.0/companies({id})/purchaseInvoices({id}).

    My purchase invoice line contains values. The API returns the accurate value when the purchase invoice line is an item. However, when the purchase invoice line is a G/L Account, it returns 0.

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,969 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,143 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 688 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans