Dear Team,
I found a problem by clicking the refresh button within the Kpi-Definition-DetailView .
The ProxyCollection which is used for showing the matching objects for the criteria is recreated on clicking the refresh button (the preview tab must be visible), but the old collection is not deregistered from the underlying object space. On each click on the refresh button you got more and more ProxyCollection-Instances.
If you have complex criteria which use child objects for filtering and edit now one of these objects you get an ObjectDisposedException on saving your changes. The reason is that the old still existing ProxyCollection instances get an event by the object space for reloading but they can’t because of an already disposed session.
Please can you check this?
Thank you
Best regards
Melanie
Hello Melanie.
We need additional time to replicate and research this issue. We will update this ticket once we have any result. If you can provide us with a small sample project demonstrating the issue in action, it will be appreciated.
Hello Melanie,
I was unable to replicate the issue on my side using the XCRM demo. I have created a video showing my attempts. It seems that I missed some important steps in my attempts to reproduce the issue. Please record a video to illustrate the steps necessary to recreate this behavior on our side.
I hope to hear from you soon.
Thanks,
Marina
Hello Marina,
Here is a video which demonstrates what happens in your code.
I am using in this video a simple XAF Application with the KPI Module, nothing else.
I created a simple KPI Definition without any restriction. It returns no objects, however we don’t need any data for the demonstration.
I set two breakpoints in the code, first in the constructor of the ProxyCollection-class and the other one in the objectSpace_Reloaded-method of the CollectionSourceBase-class.
Please take a look on the video and see what happens on clicking the refresh button multiple times.
You get two ProxyCollection-instances more per click, the old ones are still registered to the object space and get the reload event.
Thanks,
Melanie
Hello Melanie,
Thank you for the video. I have managed to reproduce this issue. I'll forward this ticket to our R&D team. They will examine it and do their best to resolve this issue.
Thanks,
Marina