Best practice to use online entities in offline entities for outsystems mobile

Hi Everyone,

I am working in outsystems mobile app .

How can i use Static Entities which are in OutsystemsUIMobile ,when my device is in Offline mode.

I am providing an Offline support in my application.

For Example:-

I am using ImageSlider in my home page .

There is one property ,whose data type is AutoPlay  Identifier in imageslider .

This entity is in OutsystemsUIMobile.

But in offline mode because of AutoPlay entity "Request failed with error " is coming.

So should I use GetNetworkStatus strategy or something better to use.





Solution

Hi Vivek,

Wheter offline or online, you can always use the identifier of a Static Entity (i.e. Entities.StaticEntityName.StaticEntityRecordIdentifier). You just can't query it, e.g. to get a label name. If you really need to query it, you'll need to sync it like it's a normal Entity. Make sure you make the Identifier for that Entity of type StaticEntityName Identifier, or else you have to cast it all the time.

Solution

Kilian Hekhuis wrote:

Hi Vivek,

Wheter offline or online, you can always use the identifier of a Static Entity (i.e. Entities.StaticEntityName.StaticEntityRecordIdentifier). You just can't query it, e.g. to get a label name. If you really need to query it, you'll need to sync it like it's a normal Entity. Make sure you make the Identifier for that Entity of type StaticEntityName Identifier, or else you have to cast it all the time.

I just checked ,It works in Offline mode also .

In my case error "Request failed with error " was with different server action .

Thanks Kilian for your reponse.



You're most welcome, happy coding!