I have a custom plugin I've created that calculates tax automatically on a Quote Product (entity.LogicalName = quotedetail). It takes the amount field (BaseAmount), the manual discount field (ManualDiscountAmount) and a custom 'Tax Percent' field (new_UKTaxPercent). The math is pretty simple ((BaseAmount - ManualDiscountAmount) / 100 * new_UKTaxPercent).
My plugin fires 2 steps, first on the create message to initialize the variables and set the tax percentage field to 20 and then on the update message to calculate the tax based on the values passed into the context after the entity is created.
The tax field calculates and sets after the plugin runs for the first time, however, if I then modify the manual discount amount, the tax is not recalculated. It is however, if I modify the amount field.
I have a Post Operation Create step that includes a Post Image called postImage and a Pre Operation Update step that fires after the Create step with a Pre Image called preImage:
My question is simply, why doesn't the update of the manual discount field trigger the update of the tax field but the update of the amount field does?
Edit: Screenshots of the update step added below on request
Thanks in advance
currentEntity.Description = _manualDiscountD.ToString();
which returns 0.00 - so the update step is definitely not passing the data through – eredn_