Native Mobile Offline App – Issues Creating Users via Administration.Account and System.UserRole Synchronization Conflicts
0
Hi everyone,I am currently developing a Native Mobile Application in Mendix with offline-first capability enabled.I am trying to implement an admin functionality where an administrator can create new users directly from the native app, similar to how user creation works in responsive web applications using Administration.Account.However, while trying to create and manage users in native/offline mode, I am getting synchronization-related consistency errors.Some of the errors include:CE1686: Specialization 'Administration.Account' should have an offline synchronization mode as its generalization ('System.User') has an offline synchronization modeCE2994: Cannot refer to entity 'System.UserRole' in an XPath constraint because it has a conflicting synchronization modeCE2995: Cannot refer to association 'System.UserRoles' because it is owned by entity 'System.User' which has conflicting synchronization modesFrom what I understand, the issue seems related to:Offline synchronization mode compatibilityUsage of System.User, Administration.Account, and System.UserRoleXPath constraints on role selectionNative offline limitations around system entitiesMy questions are:Is creating new application users from a Native Mobile app officially supported in Mendix?If yes, what is the recommended approach?Should user management always be handled through online microflows/pages instead of offline entities?Is there a best practice for assigning user roles in Native applications?Has anyone implemented admin-based user creation successfully in an offline-first native app?Any guidance, recommended architecture, or best practices would be very helpful.Thank you. Native Mobile Offline App – Issues Creating Users via Administration.Account and System.UserRole Synchronization Conflicts
asked
Madhu Kumar
1 answers
1
Hi Madhu Kumar,
Creating and managing Administration.Account / System.User directly in an offline-first Native Mobile app is not supported as a fully offline use case.
The errors you see are caused by Mendix system entities having special synchronization behavior that conflicts with offline entities.
Administration.Account specializes System.User.
System.User and System.UserRole are system entities
System security entities are not designed for offline synchronization.
Is creating new application users from a Native Mobile app officially supported in Mendix? - Yes - but only reliably through ONLINE server-side microflows. Not as fully offline synchronized security entities.
recommended approach - non-persistable/offline-safe entities and online microflows for actual account creation.
Should user management always be handled through online microflows/pages instead of offline entities? - Yes
Is there a best practice for assigning user roles in Native applications? - app-specific role entity offline and map to System.UserRole server-side