Creatio mobile - discard unsaved changes

Hi, I'm trying to use crt.ClosePageRequest in the mobile app. If any field on the view has been previously changed, a popup appears asking me to confirm whether I really want to discard the current changes. Unfortunately, I'm unable to get rid of it in any way. In the browser version of Creatio, defining a handler for the crt.CanDiscardUnsavedDataRequest request helped, as described in this article: https://customerfx.com/article/suppressing-the-unsaved-data-prompt-when…
I've already tried many different things, including setting $context.HasUnsavedData = false, but unfortunately without success.
 

Like 2

Like

2 comments

Hello,

This functionality is currently not available in the mobile application. It can lead to unintended data loss caused by accidental swipes, taps, or navigation actions.

Additionally, overriding crt.ClosePageRequest would not address all navigation scenarios. For example, it would not be triggered when users navigate away from the page using device-level system buttons or gesture-based navigation, which are common on mobile devices.

Hi Krzysztof,
Thanks for the explanation, but I think this doesn't fully explain the limitation. The web app has the same risk (accidental clicks, closed tabs, etc.), but `crt.CanDiscardUnsavedDataRequest` still allows a developer to skip the prompt when needed. The idea isn't to change the default behavior for users, it's to give developers the same option that already exists on web.
The point about system-level gestures and buttons is fair, but it only means the hook wouldn't cover 100% of cases. On web, closing the browser with an OS shortcut isn't covered either, and the hook is still useful for the navigation paths that do go through the app logic.
 

Show all comments