Views:
Applies to Product - Microsoft Dataverse

What’s happening?
The Quantity field in the related Detail records (msdyn_quotelinetransaction) is not updated when the Quantity value in the Product (quotedetail) is changed via a Plugin from a custom API.
 
Reason:
The changes made to the Quantity field on the Product (quotedetail) do not automatically propagate to the related Detail records (msdyn_quotelinetransaction) when updated through a Plugin.
 
Resolution:
To ensure that changes made to the Quantity field on the Product (quotedetail) are applied to the related Detail records (msdyn_quotelinetransaction), the following steps should be taken:
1. After updating the Quantity on the Product via the Plugin, trigger the appropriate recalculation mechanism.
2. Run the "Recalculate" action on the header of the related records. This action will update the total line amount field based on the new quantity in the Detail records.
3. If the "Recalculate" action does not automatically update the Detail records, manually retrieve the related msdyn_quotelinetransaction records in your Plugin and apply any necessary field updates, such as Quantity, Price, and Amount.
For further reference, consult the documentation on the "Recalculate" action: Recalculate Price Action.