Skip to main content

Notifications

Business Central forum
Unanswered

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

Posted on by

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!

 
Categories:
PurchaseInvoiceAPI.jpg
  • CU25061419-0 Profile Picture
    CU25061419-0 19 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
  • gdrenteria Profile Picture
    gdrenteria 4,232 Super User 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
    Mohana Yadav 46,183 Super User 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.

Helpful resources

Quick Links

Community Spotlight of the Month

Kudos to Mohamed Amine Mahmoudi!

Blog subscriptions now enabled!

Follow your favorite blogs

TechTalk: How Dataverse and Microsoft Fabric powers ...

Explore the latest advancements in data export and integration within ...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 284,876 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,425 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,146

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans