Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

Purchase Order Confirmation Forms (PurchEditLines) - Updating Lines

Posted on by Microsoft Employee

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
    Community Member Microsoft Employee 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
    Martin Dráb 230,235 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
    Allen Dejoux 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans