Question

crt.HandleViewModelDestroyRequest doesn't trigger on page left

When I move to another section from a record FormPage, `crt.HandleViewModelDestroyRequest` doesn't trigger. And as a result, websocket subscription steel remains and works. So is there any real replacement for `destroy()` method from classic ui?

Btw, `crt.HandleViewModelPauseRequest` is not an option, cause it fires if a page of lookup field was opened, when I need to handle message in this case too.

Like 0

Like

1 comments

Hi Dmitry, please have look at this academy article. In Freedom UI there isn’t a “true” page destroy() like in Classic. Since 8.0.6 Creatio keeps the ViewModel alive (module caching), so crt.HandleViewModelDestroyRequest often won’t fire when you leave a record page; the platform recommends treating crt.HandleViewModelPauseRequest as the replacement and pairing it with crt.HandleViewModelResumeRequest.

Show all comments