Execution order between things like calculated attributes, on change, etc.

0
Let’s say you have two attributes on an object, Quantity and TotalPrice. The user inputs a value for Quantity which I then want to round based on some other stuff. I will do this with an on-change microflow. So, when they leave the field the value is changed slightly from their input. Then, TotalPrice is based on this Quantity and is a calculated attribute. I know the calculated field will not actually trigger until i ‘reload’ the object but i want to know in general the hierarchy/sequence for how these things execute – meaning on enter,change,leave, event handlers, calculated fields, etc.. For example, if i immediately passed this object to another microflow, which quantity value would contribute to the total price used in the microflow.
asked
1 answers
1

Calculated attributes are calculated on the moment of retrieve. So if you change values after the retrieve that would influance this field it will not show because it will only be recalculated on a new retrieve or refresh of that object.

The on enter, on change or on leave speak for them selves. It will trigger something but unless you trigger a refresh of that object with the calculated field it will not change the calculated field. Even passing that object wihtout a refresh will still pass the old calculated value.

Does this help?

Regards,

Ronald

[EDIT]

Evant handlers are triggers in microflows just like you can have triggers in a field on a form. So the on change in a form triggers a microflow and in the microflow I can trigger other microflows actions when I commit, delete or rollback something. To see the flow use breakpoints and step through your code to see everything in action. You will see that your on change action fires a microflow and that that microflow will trigger other microflows when a after commit handlers is set and you commit that object.

answered