Mobile Offline
Question

Hey,

I have a mobile application where the user is able to use it offline,

There are several role validations thru the application, both screen roles and conditional validations with roles, when the user is offline (no internet) he has to be able to keep using the application, so the roles checks have to be done the same way, and the user can't be logged out if offline he has to keep logged in, is this possible, if so, how?

HI Henrique

Yes, it's possible, you need to sync all those roles to the local storage of the device in order that the app can validate offline.

You can check the document regarding offline Sync: 

https://success.outsystems.com/Documentation/11/Developing_an_Application/Use_Data/Offline/Implementing_Offline_Sync

Regards

Gonçalo Almeida

mvp_badge
MVP

Hi Henrique,


You can get the roles client side with Javascript (meaning, you don't have to be online to do it). You just need to place the javascript on the OnReady or OnInitialize and assign the roles to a local variable (e.g. HasAdminRole) and then use the variable on your screen.

You can read in this OutSystems documentation article, how to do it.



Kind Regards,
João

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.