Skip to main content

Notifications

Announcements

No record found.

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.

  • BS-27061404-0 Profile Picture
    7 on at
    Purchase Invoice API Issue: Total Amounts Zero with G/L Account

    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.

  • CU25061419-0 Profile Picture
    on at
    Purchase Invoice API Issue: Total Amounts Zero with G/L Account
    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
  • Gerardo Rentería García Profile Picture
    20,638 Most Valuable Professional on at
    Purchase Invoice API Issue: Total Amounts Zero with G/L Account
    Hi
    Do you have amounts in the document lines?
    BR
    GR
  • Mohana Yadav Profile Picture
    60,244 Super User 2025 Season 1 on at
    Purchase Invoice API Issue: Total Amounts Zero with G/L Account
    Are you using standard API or custom?
     
    I could not see your attachment for some reason, Please paste directly in the chat.

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,655

#2
Mansi Soni Profile Picture

Mansi Soni 1,574

#3
YUN ZHU Profile Picture

YUN ZHU 1,453 Super User 2025 Season 1

Featured topics

Product updates

Dynamics 365 release plans