web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

Dual-write quote-to-cash: Price order fails on sales orders, but work on quotations

(1) ShareShare
ReportReport
Posted on by 20

Hi all,


We’re setting up the quote-to-cash integration between Supply Chain Management and Dynamics 365 Sales through dual-write, and we’ve hit a problem that affects sales orders but not sales quotations. I’m hoping someone has seen it before.

 

Our environment is Supply Chain Management 10.0.48, running as a unified sandbox linked to a Dataverse environment with Dynamics 365 Sales. All the dual-write solutions (Core, Finance, Human Resources, Supply Chain Extended, and Party and Global Address Book) are up to date. The Dynamics 365 Sales quotation and order maps for headers and lines are running, the CDS equivalents are stopped, and the feature states table has synced from F&O. In Accounts receivable parameters, Integrate quotation lifecycles, Make Supply Chain Management price master and Calculate and push prices are all Yes, while Use message processor is No and seamless sync is not enabled. You can see the below set up which has been completed on the environment:
 


Quotations work well. Selecting Price quote in Sales brings back the line discounts and totals calculated in F&O, and Push price and totals on a quotation in F&O completes without error. This is the output we achieve when we price a quote, which we are similarly trying to achieve with the Price Order:
 

However, Sales Orders don’t work as intended. When we select Price order in Sales, the call comes back as failed with “Write failed for entity Dynamics 365 Sales order headers with unknown exception”. The response shows an execution status of 2, just an empty error, and no transaction timeout. When we run Push price and totals on the same order in F&O, we get “Object reference not set to an instance of an object”. It happens on every order, including newly created ones, whether they were created directly in Sales or converted from a priced quotation. This is the output we can achieve when we attempt to price an order - we can get unit price and the correct line discount amount but the line discount percentage and total amount are not being populated, despite having the LINEDISCOUNTPERCETAGE and ORDERTOTALAMOUNT fields mapped on dual-write.
 


As far as we know, Price order has never worked on orders in this environment, while quotations have worked from the start. Has anyone seen the same split, or found a setup step that perhaps only applies only to orders? Any help would be greatly appreciated.

Thank you in advance!

  • Assisted by AI
    Ahsan Shahid Profile Picture
    31 on at

    Ran into this exact split before, quotes fine but orders dying. That “Object reference not set to an instance of an object” on Push price usually isnt a mapping issue (your fields are mapped, thats why quotes work). It’s almost always the price push not finding something it expects on the order header.

    First thing i’d check: open a failing order in Sales and confirm it actually has a price list and currency set before you hit Price order. Quotes often default these where orders dont, and if theres no price list on the header the totals push has nothing to land on, hence the null ref. Also worth confirming the Sales order totals map (not just header/line) is actually running, since quotes use a slightly diff map set.

    And grab the real error from Dual-write plug-in trace logs / run execution history instead of the UI toast. The toast just shows the generic wrapper, but the trace will tell you exactly which entity/field is coming back null.

    Quick one: does it fail at the header write or the totals line write? If header writes but totals dont, its the price engine. If the header itself fails, its the order map or number sequence. That’ll narrow it fast.

    We handle a lot of these SCM to Sales dual-write setups at Trango Tech, happy to dig in if you share the trace log. Good luck 🙏

  • SG-23090655-0 Profile Picture
    20 on at

    Hi @Ahsan Shahid,

    Thanks for the suggestions. Price list and currency are both set on the failing orders’ headers as well as all required fields in F&O have been set to required in CE to prevent this issue from occurring, and the header and lines create fine in both systems, so the failure is in the calculation step rather than the header write. I couldn’t find a separate totals map in the mapping reference. Which map do you mean? The totals fields sit on the Dynamics 365 Sales order headers map in our setup.

    I’ve also opened a Microsoft support case to get it investigated, so fingers crossed there will be some headway with their involvement.

  • Suggested answer
    Navneeth Nagrajan Profile Picture
    2,715 Super User 2026 Season 2 on at

    Hi @SG-23090655-0,
    A few pre-requisites to check:
    1. Check the table map versions. It should be version 1.0.1.0 instead of 1.0.0.0. 
    2. Also, ensure the Dual-write Supply Chain solution ≥ 2.3.4.203. 

    For Orders that are created from Sales Quotations, ensure that the price list and the discount lists are populated as these are the master data fields overriden from Sales quotations to sales orders. 
    The OrdersTotalAmount and the LineDiscountPercentage should be mapped from the SalesOrderLineCDSV2Entity and these are sales order line fields that should be mapped with the CE Orders entity. To add to what @Ahsan Shahid mentioned about totals calculatioins, you can calculate and push totals only, the system doesn't recalculate any line unit prices or discounts.
    Sales and Marketing → Periodic tasks → Calculate sales order totals for Sales
    There will be a dialog window that pops up. Mention the number of days in the Age field. In this case, we have mentioned the number of days as 30.

    Hope this helps. 


    References:
    https://learn.microsoft.com/en-gb/dynamics365/fin-ops-core/fin-ops/data-entities/add-efficiency-in-quote-to-cash-enable#initial-setup

    https://learn.microsoft.com/en-gb/dynamics365/fin-ops-core/fin-ops/data-entities/add-efficiency-in-quote-to-cash-use#make-supply-chain-management-the-price-master

     

  • JG-10110020-0 Profile Picture
    4 on at

    @SG-23090655-0 - Hi - I have exact same problem.  Quotes are working perfectly and sales orders are not.  Did you have a resolution?

  • Suggested answer
    Patrick Mouwen Profile Picture
    215 on at

    Hi both,

    Price order in Sales and Push price and totals in F&O run the same order pricing step (SalesOrderD365SalesEntityUpdatePrice), and for orders that step first checks whether the order is priced by Unified pricing management. 

    If it is, the whole order is priced by the UPM engine (GUPSalesOrderCalculator), which runs on the Commerce pricing runtime (.Net). Price quote has no such branch: quotation lines are repriced line by line with the standard (SCM) trade agreement engine. "Object reference not set to an instance of an object" is a .NET error, which fits that UPM runtime rather than the trade agreement code.
     

    An order takes the UPM route when the Unified pricing management feature is on and pricing isn't switched off in Pricing management parameters. A quick tell in F&O: unless order completion is switched off there too, those orders show a Complete button and Confirm is greyed out.
     

    What I'd check:
    1. Is Unified pricing management on in this environment, and do the failing orders show that Complete button in F&O?
    2. If you don't want UPM to price these orders, switch pricing off in Pricing management parameters, create a new order in Sales and run Price order again. Existing orders keep their UPM flag, so test with a new one.
    3. If you do use UPM, the error sits in the UPM setup for these orders rather than in dual-write, so that's where to look next.
     

    My test system is V49 not your V48, but I think the same conclusions apply to V48.

    Patrick

  • JG-10110020-0 Profile Picture
    4 on at

    @Patrick Mouwen Patrick thank you for this response.  We did have pricing management feature enabled (parameter disabled) - however - after removing the feature we can now see the correct prices in F&O.  But when we price order in CE - we still have the same error message.  
    @SG-23090655-0 - did you resolve this ever?  Just wondering what Microsoft said with regards to your ticket?

  • Patrick Mouwen Profile Picture
    215 on at

    Hi,


     

    Good to hear the F&O prices are right again. That confirms Unified pricing management was pricing those orders. I think the error in Sales is a separate problem.


     

    Price order in Sales calls F&O, F&O reprices the order, and then writes the header and every line whose amounts changed back to Dataverse through the dual-write maps. So the error can come from three places: the call from Sales, the pricing in F&O, or that write-back, where every plug-in registered on Order and Order product update runs. Quotes go through the same mechanism but write to Quote and Quote product, which have their own plug-ins. So "quotes work, orders don't" doesn't prove the problem is on the F&O side.


     

    To find out where it breaks I suggest the following:

    1. Run Push price and totals in F&O (Sell tab) on the same order. It runs the same pricing and the same write-back, but from F&O, so you see the actual error there. If "Calculate and push prices and totals in batch" is on (Accounts receivable parameters, Dynamics 365 Sales integration tab), check Message processor messages for the failed message instead.

    2. In Dataverse, set plug-in trace logging to All, run Price order again and open the Plug-in Trace Log. The type name on the failing entry tells you which plug-in throws the null reference. Plug-ins from other apps or custom code on Order product are where I'd look first.

    3. If F&O only shows a short "unable to write" message, set IsDebugMode on the dual-write project configuration. The full Dataverse response then lands in DualWriteErrorLog: https://learn.microsoft.com/dynamics365/fin-ops-core/dev-itpro/data-entities/dual-write/dual-write-troubleshooting


     

    Can you share what the trace log or the F&O error says?


     

    Patrick


     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 39 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 37 Super User 2026 Season 2

#3
Subra Profile Picture

Subra 24 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans