Change the value of a column in a master-detail table

The objective of this doubt is that I want to reduce the stock of products this would be as "stock out", for this I have 3 related tables, the first one called Master, the next one called MasterDetail and finally the table products. I have this page where I add the details in this case the products that I have to reduce the stock. When I click on the new button I get this pop-up, where I select the quantity to decrease and the product. The "Save" button has the following microflow where I subtract the stock by the quantity, I make the commit (this is where I have the problem) and at that moment it is saved in the database. If I do the normal save and decreases the stock, for example: I click on the last button "Save" and the master-detail is saved. My problem is when I give "Cancel", the previous microflow together with all the operation of subtraction of stock should make rollback all complete, but this does not happen, it is still saved what I did with the microflow. I can not find a way to handle everything in the same operation so that this does not exist, if you know of another way to do it or how I could subtract the value outside the microflow or in another section, so that when I cancel it is not saved, it would help me a lot...  
1 answers

Hi Anthony,


Rollback only works for data that has not been committed yet.

Could you try removing the commit action from that microflow, enable ‘refresh in client’ on the change action if necessary and make sure that everything gets committed when clicking the last ‘Save’ button.