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

"Auto-Receive Purchase Order on Confirm Button Click in D365FO"

(2) ShareShare
ReportReport
Posted on by 196

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:

  • 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

 
image (4).png
Categories:
I have the same question (0)
  • Martin Dráb Profile Picture
    237,996 Most Valuable Professional on at
    Is it a good idea at all? For example, you may need to record serial numbers of items you're receiving, which isn't covered by the process you're suggesting.
  • André Arnaud de Calavon Profile Picture
    301,231 Super User 2025 Season 2 on at
    Hi Aditya,
     
    Can you explain for what reason you want to receive the PO when confirming it? What is the process about functionally? Should this be done for all POs? Or based on certain conditions?

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
Abhilash Warrier Profile Picture

Abhilash Warrier 669 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

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

#3
Martin Dráb Profile Picture

Martin Dráb 384 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans