Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

PurchPrice not posting to VendInvoiceInfoLine table when using VendVendInvoiceServiceClient

(0) ShareShare
ReportReport
Posted on by

Hello all, I am a developer working on an integration with Dynamics AX. I am creating a non-PO based invoice in the system through a C# Web Service.

My issue is that I am defining the "PurchPrice" variable in the "AxdEntity_VendInvoiceInfoLine" of the request and can confirm it is being sent to the program, but when I view the invoice created in AX, the "PurchPrice" is 0. See below:

var lineItem = new AxdEntity_VendInvoiceInfoLine()
{
    OrderAccount = "12345",
    ItemId = "454545",
    Description = "Television",
    ReceiveNow = 1,
    LineAmount = 499.99,
    LineAmountSpecified = true,
    PurchPrice = 499.99,
    PurchPriceSpecified = true,
    Closed = AxdEnum_NoYes.No,
    ClosedSpecified = true
};

AX_5F00_Invoice.png

All other data that I am passing seems to be posting OK, and I can confirm that the "PurchPrice" field from VendInvoiceInfoLine" is the proper field because if I change the value in SQL after posting it, then it displays correctly.

I have also set the prices in the item itself within AX. I set the purchase price and attempted the posting again, but this value still posts as 0.

Can anyone provide guidance on what controls this value being set? Is there additional configuration in AX needed to set this price? Any help at all will be appreciated. Thank you!

  • Community Member Profile Picture
    on at
    RE: PurchPrice not posting to VendInvoiceInfoLine table when using VendVendInvoiceServiceClient

    Thank you so much for this response. I guess this was the issue! Passing only the quantity and purchase price automatically calculates the line amount and my purchase price is filling in now. I really appreciate the response!

  • Verified answer
    André Arnaud de Calavon Profile Picture
    294,099 Super User 2025 Season 1 on at
    RE: PurchPrice not posting to VendInvoiceInfoLine table when using VendVendInvoiceServiceClient

    Hi Evan,

    When you have specified a line amount (LineAmountSpecified), then it is considering that there might be a rounding difference or lumpsum. This is then causing the unit price to be 0. Try to remove the coding for the line amount fields and let the application calculate the line amount.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,099 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,866 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans