Hello,
in my Web-Application i have a Client Action that is triggered On Destroy (when leaving the screen), that stops right after the Refresh Data element. I checked with the Message element, the stopping point is definitely Resfresh Data. Now, if i trigger this Client Action with a button, it runs as expected. Only when it's triggered by leaving the screen, it will start and then stop right after the Refresh Data. Anyone got an idea why, or how i could fix that?
Thanks
Hi Michael,You might want to have a look at the Screen And Block Lifecycle documentation to better understand what is happening.The sequence of screen and block events might not be as you expect it to be.The onDestroy from the old screen will be executed later than screen events from the new screen.Hope this helpsKind regardsThibaut
Thanks Thibaut, i understand it better now. I'll find another way to do this.
I did some testing based on this question :
The intention of a dataAction or Aggregate is to retrieve data to be displayed in the screen, so it doesn't really make sense to refresh that in an OnDestroy.
Dorine
Yes, i was trying to 'clean up' unused data when leaving the screen. Instead i'll try to work with Screen Variables and keep my data clean from the start. Like you said, it does not make sense to fetch data for a screen that is being 'destroyed'.
Thanks anyway for checking!