Tag Archives: Procurement
How a Leading North American Commercial Vehicle Manufacturer Bridged the Legacy PO Cancellation Gap in Dynamics 365 Finance & Operations Using DMF and X++
01Summary A leading North American manufacturer of heavy-duty commercial vehicles moved three years of procurement history from a legacy ERP into Dynamics 365 Finance and Operations, and roughly 4,000 of those Purchase Orders were already cancelled in the source system. The Data Management Framework imported them as records without complaint, but DMF cannot run a PO cancellation, so those orders landed in D365 F&O as confirmed supply and the first test Master Planning run returned net requirements of zero for hundreds of items the assembly line actually needed. CloudFronts extended the DMF staging entity with a cancel flag and added a post-import X++ batch job that reads the flag and calls the same cancellation API behind the Cancel button on the Purchase Order form. All 4,000 cancelled POs now hold the correct state in D365 F&O, MRP plans against real supply, and a reconciliation log gives procurement a line by line count to check against legacy. Table of Contents 01Summary→ 02About the Customer→ 03Business Challenges→ 04Solution Overview→ 05Technical Approach→ 06Business Impact / Key Takeaways→ 07Conclusion / Final Thoughts→ 08Call to Action / Connect With Us→ 02About the Customer Our customer is one of North America’s leading manufacturers of heavy-duty commercial vehicles, operating an extensive network of manufacturing and logistics facilities. As part of its supply chain operations, the organization manages high-volume production, component manufacturing, and distribution processes that require seamless integration across enterprise systems. 03Business Challenges The customer builds heavy-duty commercial vehicles across a network of manufacturing and logistics facilities, running high-volume component production that feeds a fixed assembly schedule. Master Planning was a go-live dependency, not a phase two item. If MRP could not be trusted on the first run, the build schedule could not be trusted either. Uncancelled POs are phantom supply D365 F&O nets demand, meaning sales orders, production orders and forecasts, against supply, meaning on-hand inventory, Purchase Orders and planned orders. Every confirmed PO counts as expected incoming material. Import 4,000 cancelled legacy POs as confirmed orders and the planning engine sees 4,000 supply lines that no vendor will ever ship. The arithmetic is unforgiving. Net requirement is demand minus supply, so inflating supply with dead orders drives net requirement to zero or below. MRP then raises nothing. The warehouse stays empty and the line stops. ⚠One PO can suppress an entire item A single uncancelled PO for a high-value component, an engine assembly, a transmission housing or a steel frame, suppresses MRP planning for that item across every production order that needs it. At 4,000 phantom POs, the whole planning output stops being usable. Where the existing pipeline stopped Legacy system exports PO line recordsEvery Purchase Order, active or cancelled, leaves the legacy ERP as a flat file record. DMF imports the records into D365 F&OPO lines land in PurchTable and PurchLine through the standard Purchase Order Lines data entity. Backend automation approves and confirms POs starting with NThe automation picks up everything matching that number series prefix and pushes it through approval and confirmation. That pipeline handled active orders well. The cancelled ones broke it in four separate ways. No flag in the file. The legacy export mixed active and cancelled POs, and the DMF entity carried no field to mark which ones needed cancelling in D365 F&O. The automation confirmed the wrong orders. It ran on every PO matching the number series, so orders cancelled in legacy were approved and confirmed into live supply commitments. Manual cancellation cost weeks. The UI cancels one PO at a time. The team sized 4,000 POs at three to four weeks of clicking, and MRP could not run reliably until that cleanup finished. No reconciliation record. Even a manual pass would leave no structured log proving each cancellation completed, and no way to match the cancelled count between legacy and D365 F&O. Why the cancelled POs could not simply be dropped from scope MRP accuracy was the reason this work became non-negotiable, but three other requirements pointed the same way. Audit and compliance. Procurement auditors trace why a purchase was raised, who approved it and why it was reversed. Three years of history with the cancellations missing is a history with holes in it. Vendor performance analysis. Cancellation patterns are where lead time failures and specification mismatches show up. Migrate only active and completed POs and procurement loses the evidence it negotiates with. Financial reconciliation. Cancelled POs that carried prepayments, accruals or commitments have to exist in D365 F&O so finance can close out historical transactions without opening the legacy system again. 04Solution Overview Before the fix makes sense, one thing about D365 F&O has to be clear. Cancelling a Purchase Order is not a data update. It is a business operation, and the status field is the last thing it touches, not the first. What the Cancel button actually does Validation checks. The system tests eligibility. Has a product receipt posted against any line? Has an invoice been matched? Are registrations pending? Any of these blocks the cancellation or narrows it to specific lines. Workflow recall. If Change Management is enabled, the approval workflow is recalled so the PO leaves its approved state through the proper channel instead of a status override. Accounting distribution reversal. Encumbrances, pre-encumbrances and budget reservations created at confirmation are reversed or voided. Inventory marking cleanup. Marking references between PO lines and sales or production order lines are removed. MRP exclusion. The PO drops out of Master Planning calculations and stops counting as incoming supply. For this migration, that was the step that mattered. Status update. Only once all of the above completes does the PO status become Cancelled. The Purchase Order Lines DMF entity writes field values into PurchTable and PurchLine. It does not invoke any of those six steps. Push a status value of Cancelled through DMF and you get one of three outcomes, a validation failure, a silently ignored value, or a written status with none of the underlying logic behind it. That third outcome is the dangerous … Continue reading How a Leading North American Commercial Vehicle Manufacturer Bridged the Legacy PO Cancellation Gap in Dynamics 365 Finance & Operations Using DMF and X++
How a Leading North American Commercial Vehicle Manufacturer Prevented Incorrect Purchase Prices on Purchase Orders Using Dynamics 365 Finance & Operations
Summary A leading North American commercial vehicle manufacturer was experiencing incorrect purchase prices on Purchase Orders in Dynamics 365 Finance & Operations. The root cause: overlapping trade agreement records in the PriceDiscTable that were never closed when new prices were introduced. CloudFronts diagnosed the issue and implemented a single rule – close the active trade agreement record before creating a new one – enforced through automation on both inbound integrations and manual entry workflows. The result: deterministic price resolution, clean audit trails, and procurement teams that trust the system again. Table of Contents 01Summary 02Customer 03Why it matters 04Our perspective 05Price logic 06Problem 07Fix 08Example 09Automation 10Edge cases 11Conclusion About the Customer Customer Overview Our customer is one of North America’s leading manufacturers of heavy-duty commercial vehicles, operating an extensive network of manufacturing and logistics facilities. As part of its supply chain operations, the organization manages high-volume production, component manufacturing, and distribution processes that require seamless integration across enterprise systems. For growing businesses running Dynamics 365 Finance & Operations, procurement accuracy is non-negotiable. As order volumes climb and vendor pricing evolves, even a small gap in how purchase prices are managed can quietly erode margins, trigger invoice disputes, and undermine trust in the system. One of the most common and most overlooked causes of pricing errors on Purchase Orders is something surprisingly simple: outdated trade agreement records that were never closed. Have you ever updated a vendor’s price in D365 FO, only to find that Purchase Orders raised the next week still show the old price? If you’re nodding, this article is for you. Consider this: organisations that leave overlapping trade agreement records unmanaged often find hundreds, sometimes thousands, of duplicate active price records for the same Item x Vendor combination in their PriceDiscTable. Each one is a potential pricing conflict waiting to surface on a Purchase Order. The cumulative effect on procurement accuracy, AP reconciliation time, and vendor relationships is significant. By the end of this article, you will understand exactly why this happens, how D365 FO’s price engine actually resolves trade agreements, and the single rule that eliminates the problem entirely. Why This Matters Incorrect Purchase Prices Create Real Business Risk Incorrect purchase prices on POs are not just a data nuisance. They lead to overpayments that chip away at margins, invoice mismatches that clog up Accounts Payable, and worst of all, procurement teams who stop trusting the system and start overriding prices manually on every order. Once that happens, the entire value of centralized pricing governance is gone. Why We’re Writing This A Pattern We See Across D365 F&O Implementations At CloudFronts, we’ve implemented and supported Dynamics 365 F&O procurement modules across manufacturing, distribution, and services organisations. This specific issue, stale trade agreements causing wrong PO prices, has come up in nearly every engagement where vendor prices are managed through the Trade Agreement Journal. We’ve seen the pattern, diagnosed the root cause repeatedly, and built the automation to prevent it. This article distils that experience into something actionable. How D365 F&O Resolves Purchase Prices The Price Comes From Trade Agreements, Not the Item Master The price on a Purchase Order line does not come from the item master. It is resolved from a Trade Agreement, a dated record that says: “For this item, from this vendor, in this currency, starting from this date, the unit price is X.” These records are created through the Trade Agreement Journal, posted, and stored in the PriceDiscTable. When a PO line is created, the price search engine finds every posted record whose date window, from From Date to To Date, covers the PO date. It then filters by matching keys such as item, vendor, currency, site, warehouse, and quantity break, and selects the price. Critically, the system does not prefer the most recently posted record. It looks at date windows. If two records both cover today, the engine has two valid candidates. Its tie-breaking behaviour is not something you should rely on for pricing accuracy. The Problem Overlapping Records Create Pricing Conflicts Here’s how the issue plays out. A vendor price is loaded into D365 FO, either from a legacy system integration or manually by a buyer. The record is created with an open-ended To Date, the sentinel 1900-01-01 or a far-future date, meaning it never expires. Months later, a new negotiated price arrives. A fresh trade agreement line is added for the same Item x Vendor. But nobody closes the original record. Both records now have date windows that include today. The price engine finds two matches, and sometimes the older, stale price wins. Root Cause There is no closure step. Every new price is layered on top of the old one instead of replacing it in time. The Fix Close Before You Create The rule is simple: whenever a new price record is created for an Item x Vendor combination, the currently active record must have its To Date set to Today – 1. The new record’s From Date is set to Today. This produces two non-overlapping windows: old price valid up to yesterday, new price effective from today. Why Today – 1? If both dates include the same day, the engine still finds two candidates. One day’s difference makes the price resolution deterministic. Worked Example One Item, One Vendor, One Clean Price Timeline Item purchased from Vendor A, USD, quantity break of 1: Event Action From Date To Date Price 22 June – Initial load Create Record A 22 June 2026 Open-ended $7.00 24 June – New price Close Record A 22 June 2026 23 June 2026 $7.00 24 June – New price Create Record B 24 June 2026 Open-ended $6.50 After posting, any PO dated 24 June or later picks $6.50. Historical POs on or before 22 June still resolve to $7.00. Clean, unambiguous, audit safe. Where to Enforce This Rule Automation Should Handle the Closure Inbound Integration If prices flow from a legacy system via OData, build a custom API endpoint in D365 FO that … Continue reading How a Leading North American Commercial Vehicle Manufacturer Prevented Incorrect Purchase Prices on Purchase Orders Using Dynamics 365 Finance & Operations
