Automated Notifications for Purchase Orders Approaching Deadline in D365FO
In any procurement process, timely delivery is key to maintaining operational efficiency. However, with hundreds of purchase orders (POs) in progress, it's easy for a few to slip through unnoticed—especially those with deadlines quietly approaching. To mitigate this, automating deadline monitoring and notifying responsible users in Microsoft Dynamics 365 Finance and Operations (D365FO) can save time, reduce delays, and ensure proactive vendor management.
This article outlines how to implement a batch job that checks for purchase orders with delivery deadlines in the next 7 days and sends a notification to the person who created the PO (i.e., the responsible user).
🧭 Context and Business Need
Purchase orders often have delivery deadlines that must be tracked manually. The procurement team may not always monitor them unless they open individual records or run reports.
This leads to:
Missed delivery timelines.
Unnecessary escalations or penalties.
Manual effort in tracking approaching deadlines.
To automate this, we propose a batch process that runs periodically (e.g., daily) to:
Fetch purchase orders with delivery dates within the next 7 days.
Identify the responsible user.
Send a notification to that user.
✉️ Notification Options in D365FO
D365FO offers a few mechanisms for user notifications:
1. Event Inbox
Appears in the user's notification center.
Works out-of-the-box without email configuration.
Can include a link to the record.
2. Email Notification
Requires SMTP/email parameters setup.
Suitable for urgent or external alerts.
More visible, but may clutter inboxes.
3. Workflow Notification
Overhead if you're not already using workflows for PO.
Not ideal for deadline alerts unless already embedded.
For our scenario, the Event Inbox method is lightweight, fast, and user-friendly—so we'll use that.
🛠️ Batch Job Code Implementation
Below is the X++ batch class that implements the PO deadline checker and sends an Event Inbox notification.
🔄 How to Schedule This as a Batch Job
Navigate to System administration > Inquiries > Batch jobs.
Click New.
Name the job "PO Deadline Reminder".
Add a new task and select PONearDeadlineNotificationBatch.
Configure the recurrence to daily.
Save and activate the job.
📌 Final Thoughts
Automating PO deadline reminders ensures responsible users are kept in the loop before it's too late. Whether you're managing hundreds of POs or just want better SLA compliance, this approach adds visibility without manual intervention.
If you wish to extend this solution:
Add vendor filters or buyer group conditions.
Send email alerts in parallel.
Integrate with Teams via Power Automate for cross-platform visibility.
Associate Lead Consultant | Microsoft Dynamics 365 F&O | FSCM | FA | Budgeting | HRMS | Payroll | Logic Apps | Azure DevOps(Boards, Process, Repos, Pipelines) | Azure Portal | AI beginner
1mo#cfbr
Mahmoud Khedr