开发者

Quote 'Detail Amount' not updated when Products added

In CRM 4, when we add a Product (Quote Product / quotedetail) to a Quote, the total (Detail Amount) is not automatically updated.

The Recalculate button on the Quote does update the total and so I tried calling the same function in JavaScript. Besides not being successful (total not updated), the Quote form refreshes after each Product is added and goes back to the Information tab.

This problem also exists when adding Products to Orders and Invoices, but strangely not to Opportunities (total is automatically updated).

I expected that this issue would have been resolved in CRM 2011, but it appears to have 开发者_JS百科the same behavior. I am also surprised that other people have not had this problem as I couldn't find anything on stackoverflow, so I would be very greatfull for any help.

Thanks


Probably not what you were looking for, but at some point, our team got so fed up with the pre-fab product structure in the CRM we ditched it altogether and built out our own product structure.

Anyway, as a workaround, you can attach your own recalculation function to the quote products subgrid via javascript, probably best done on the load of the Quote form.

function Quote_Load() {
    var grid = document.getElementById("QuoteProducts");
    grid.attachEvent("onrefresh", RecalulateQuote);
}

function RecalulateQuote() {
    //Do stuff here
}

Additionally, you can define a ribbon button and trigger the recalculation on the button click.

Alternatively, you can handle the recalculation based on a .NET plugin fired on the entity Update message.


Certainly the product engine in Dynamics 365 is complex and some have created their own pricing engine. However ditching it prematurely without understanding how you can customize the current model could lead you into re-inventing the wheel. After reading some of the comments here, it's clear that the use of the CalculatePriceRequest message in a plugin was not considered. You can either use some of the elements of the pricing engine and use this pipeline message, or you can still use most of the out of the box components and simply turn off the auto-pricing calculating feature in Settings|Administration|Administrative Settings|Sales tab and turn it off, and build plugins against the line items and header objects. Before making such a drastic decision to rebuild the product pricing engine, make sure you understand your ability to customize what's there already.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜