Notifications
Announcements
No record found.
I want to automatically receive the purchase order when the user clicks the Confirm button in D365 Finance & Operations.
📌 What I Tried: I attempted to use PurchTable.PurchStatus = PurchStatus::Confirmed; and PurchFormLetter.receiveJournal(), but I am facing errors like:
PurchTable.PurchStatus = PurchStatus::Confirmed;
PurchFormLetter.receiveJournal()
The qualifier 'PurchStatus' is not valid for field 'Confirmed'
Table 'PurchTable' does not contain a field named 'QtyOrdered'
Type mismatch: Expected Num, but found real (InventQty)
📌 Expected Behavior: When the Confirm button is clicked, the system should automatically generate the Purchase Order Receipt without manual intervention.
📌 Code Attempt:
public void confirmOrderAndReceive() { PurchTable purchTable; PurchFormLetter purchFormLetter; purchTable = PurchTable::find("PURCH123"); // Replace with actual PO Number if (purchTable) { purchTable.PurchStatus = PurchStatus::Confirmed; purchTable.update(); purchFormLetter = PurchFormLetter::construct(DocumentStatus::Received); purchFormLetter.update(purchTable, systemDateGet(), PurchUpdate::All); info("Order confirmed and receipt generated successfully!"); } else { warning("Purchase order not found."); } }
i want when i click on confirm order then i automatic revised the product receipt
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Abhilash Warrier 669 Super User 2025 Season 2
André Arnaud de Cal... 449 Super User 2025 Season 2
Martin Dráb 384 Most Valuable Professional