web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

post invoice for purchase order with charges x++

(0) ShareShare
ReportReport
Posted on by 405

Hi,

I am trying to post invoice for purchase order using x++ code.

using VendInvoiceInfoTable and VendInvoiceInfoLine table to pass value in class PurchFormLetter I am able to post PO with related all information .

once coming with charges not able to find any place where i can write markup code with amount to post with PO.

let me know if any one  aware  where i can write code?

Thank You.

I have the same question (0)
  • huijij Profile Picture
    19,811 on at

    Hi Sir,

    When you call the update() method on the PurchFormLetter,Did it not send charges as well?

    regards

  • shubhi gupta Profile Picture
    405 on at

    Hi Judy,

    no, its not sending charges information.

  • Suggested answer
    Sukrut Parab Profile Picture
    71,710 Moderator on at

    The charges  can be at PO header lever or PO line level . If you are putting the charges at header level , you have to allocate those charges to line and that is also depends on how you set up your charges code. As long as you have charges on PO header or line , those charges should be coming on your invoice from the PO.

    You have not provided enough details about your scenario but based on what you are saying , looks like you are creating invoice through x++ as well, if that is the case , take a look at details how charges are copied over to invoice when you generate invoice manually and you have to implement similar logic to copy over those charges.

    If you are just posting invoice through code which is created by someone as pending vendor invoice , charges should already be there copied from PO.

  • Rahul Singh Rathod Profile Picture
    62 on at

    In this scenario, you need to understand the invoice flow manually via debugging for charges related. Then you have to apply the same process in your custom logic.

  • shubhi gupta Profile Picture
    405 on at

    Hi Sukrut,

    I am adding charges in header level. PO created manually and once we are doing invoicing via x++ that time i need to pass markup code and amount.

    I already debug the code but did not found.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 449 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 422 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans