Skip to main content
Business Central forum
Suggested answer

Application_DialogException,Total amount (0.00) is not equal to total of lines (242.00)

editSubscribe (0) ShareShare
ReportReport
Posted on by UG Leader

I use the MS web API and with it I POST purchase invoices. For development I use Visual Studio and .NET Core.
I first POST the invoice header using the purchaseInvoice resource type.
Then I POST the invoice line(s) using the purchaseInvoiceLine resource type and the purchaseInvoice Id
I want the invoice to be posted immediately (not as a draft), therefor I issue a bound action.
After posting the bound action I get an exception, Application_DialogException,Total amount (0.00) is not equal to total of lines (242.00).

The total amount of the invoice header is not the amount I send (242.00), but 0.00
Why is the correct total amount not showing, but instead 0.00?
And how can i solve this?

Categories:
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 59,926 Super User on at
    RE: Application_DialogException,Total amount (0.00) is not equal to total of lines (242.00)

    Hi, You should first rule out the problem mentioned by Inge, it looks like the Line amount is not validated on the header.

    If it still doesn't work, you can try the deep insert method below.

    https://www.kauffmann.nl/2020/07/01/deep-insert-with-business-central-apis-part-2/

    pastedimage1655770048402v1.png

    pastedimage1655770068545v2.png

    Hope this helps.

    Thanks.

    ZHU

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,714 Super User on at
    RE: Application_DialogException,Total amount (0.00) is not equal to total of lines (242.00)

    You should try to post the same transaction using GUI to see if you run into the same problem there. Then you at least can determine if it is a API problem or not.

  • Suggested answer
    Marco Mels Profile Picture
    Marco Mels on at
    RE: Application_DialogException,Total amount (0.00) is not equal to total of lines (242.00)

    Hello,

    We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist.  If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.dynamicsuser.net/.../14

    I will open this up to the community in case they have something to add.

    Thanks.

Helpful resources

Quick Links

What Motivates a Super User?

We know many of you visit the Dynamics 365 Community and Power Platform…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,045 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 222,570 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,138

Product updates

Dynamics 365 release plans