Updating the summary field in the detail. Hello everyone

I have a detail "OrderProductDetailV2" (editable registry), in which I added my totals to "summaryItemsContainer". When changing a record in the detail, quantity, price, etc., I need to update my signatures, since the standard ones are updated (number of records, total amount). I've read many articles. I've figured out how the standard modules work. Everything is clear. I've tried different options through messages, with "onDataChanged" I get a cycle, in another option my signatures are updated, but the standard ones stop updating. Can anyone help?

Like 0

Like

1 comments

Hello,

The base logic of updating Amount and Total columns is mostly located inside the event logic of objects OrderProduct and Order. You can add your logic of updating fields using the same event logic or business process. There is definitely a risk of ending up in a loop, unfortunately, there are no recommendations to avoid it, you just need to pay attention to your code. But, because the base update is handled in event logic, you can update your values without triggering the event logic, for example with direct DB request or class Update. 

Show all comments