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.

  • Community Member Profile Picture
    on at
    RE: Purchase Order Confirmation Forms (PurchEditLines) - Updating Lines

    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.

  • Verified answer
    Martin Dráb Profile Picture
    233,025 Most Valuable Professional on at
    RE: Purchase Order Confirmation Forms (PurchEditLines) - Updating Lines

    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.

  • Allen Dejoux Profile Picture
    on at
    RE: Purchase Order Confirmation Forms (PurchEditLines) - Updating Lines

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

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

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,336 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,025 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans