BAQ on BPM calling pre update data in a post process bpm

, ,

I have a parametrized BAQ that runs some aggregate calculations that I retrieve a value from. I am calling it from a custom code block in a post process bpm on update that only runs after a field is changed.

The issue is that when this field is updated and the BAQ is called, it calculates based off the previous value of the field instead of the new updated value.

(ie. Number01 = 100 and the BAQ returns a calculated field of 10.
I then update Number01 to be 200 and the BAQ returns 10 because it retrieved the old value of Number01 and not the new one)

The BAQ displays correctly as I can check the results after the update in the BAQ editor and they display the correct updated results, it seems that when the BAQ is called in the BPM it is before the field is updated even though it’s a post process.

Is there any way of getting around this?