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, ...
Answered

Purchase Order Confirmation Forms (PurchEditLines) - Updating Lines

(0) ShareShare
ReportReport
Posted on by

I am a developer trying to modify the Purchase Orders Confirmation & Pro forma confirmation forms to include line manipulation (to mimic the form behavior of Sales Orders).

To begin, a user will select a purchase order and click Confirmation or Pro forma confirmation (this opens the PurchEditLines form):
pastedimage1595279483796v1.png

I have successfully enabled the lines tab on the form, and propagated the PO lines to the PurchParmLines table so they appear (by modifying the PurchFormletterParmDataPurchOrder class):
pastedimage1595279687715v2.png

What I would like to do is modify the lines on this form (deleting one, for example) and have that change propagate to the print report and confirmation journal. Here I can remove a line, but after clicking OK, both lines appear in the report (despite only one line being saved to the PurchParmLine table):
pastedimage1595279882743v3.png
pastedimage1595280325299v4.png

When I do the same for a sales order, only the remaining lines on the form are included in the confirmation & report - this is what I need for purchase orders.
I have looked through the closeOk methods on PurchEditLines and SalesEditLines, but cannot tell where I need to make a change.

Please help me find a solution - thanks in advance for any assistance.

goshoom I have seen you provide great technical assistance in this area - perhaps you can help me here as well.

I have the same question (0)
  • Allen Dejoux Profile Picture
    on at

    Hi Sawyer, I wont be able to assist but have you tried reaching out directly to Martin. Good Luck.

  • Verified answer
    Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    Please don't do it. I did see the thread; the problem is the lack of my time. Dealing with unnecessary messages in my inbox will give me even less time for the forum, not more.

    If nobody responds, don't try to solve it by chasing people. Instead, provide more information, so it's clearer what problem you have (and it requires less time for investigation by others). For example, you can share information that you found when debugging the code. It'll also show that you're actually investing your time and you're not just asking to invest ours.

    As far as I know, you can't add or delete lines - the journal simply displays order lines (for example, the data source of VendPurchOrderJournal form is PurchLineAllVersions view). If you want to see how the lines are prepared for printing, look into PurchPurchaseOrderDP.createOrderLines().

    It seems to me that you would have to change the whole posting, the report, the journal form and everything.

  • Community Member Profile Picture
    on at

    Thank you Martin. I apologize for reaching out directly. You were correct that the posting, journal form, report, etc. would all need modified drastically to support the modification I was looking for.

    In my case, we are opting to simply change the report for printing and leave the journal/form behavior as-is. I was able to enable the lines tab of the PurchEditLines form by modifying the run method (this exposes the PurchParmLine records generated for the confirmation). Then in PurchPurchaseOrderDP createData method I introduced logic to ensure the line (from PurchLineAllVersions) was still present in PurchParmLine (from the latest set) before passing the line to the report.

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
Martin Dráb Profile Picture

Martin Dráb 664 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 303 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans