I have a plugin that calculate tax and total on quotedetail and update quote, all works except when i revise quote extended price, tax revert to zero. I want to trigger a update when the quote is revised to set the total and tax calulation for each quotedetail line. What is message to use for this? Or is there a better way to do it? Bother Calculate Price message and Update message have the same issue. System pricing is disabled.
When you revise a Quote in Dynamics 365 , the system internally creates a new Quote record and copies over the QuoteDetailrecords. This process does not trigger the Update or CalculatePrice messages on the create of new QuoteDetail records. That’s why your tax values reset to zero. Since system pricing is disabled, you have to handle all pricing, tax, and total calculations yourself in your plugin. To fix this you should registered your plugin on the Create message of QuoteDetail entity.
When a quote is revised, new QuoteDetailrecords are created as copies of the original QuoteDetail.
On create of Quote Details calculate tax, extended price and totals for each line and after calculating update the Parent Quote record.
It will update the tax, extended price and totals properly on both Quote and Quote Details.
Hope this helps.
Thanks!
Inogic
Was this reply helpful?YesNo
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.