Hi 

I have made a Database entity called EmployeeInfo. 

Also I have made this entity called LocalEmployeeLeaveInfo in local storage.

I have right clicked and made actions(Create action to sync Data (Read and Write)).

The scenario of my problem is that I have made a form to enter data in local storage and it is working. But what I need to do is when there is no internet then only I have to add a record on local storage else it need to be on database entity. And after the internet comes I need to sync that data from local storage into server database and delete the records in local storage.

How can I achieve such functionality?  

PS I have watched the outsystems videos on sync but is not able to get the hang of it.

Hi Shubham,

In a typical scenario, you would want the local storage to be a copy of the server storage. You seem to want to store data locally only when there's no server available. The functional downside to this is that the user can't do anything if there's no connection, as there's no data available to display etc.

So what I'd advise you to do is to have all data that's apllicable in the local storage Entity, and sync that with the backend (server). Also, when loading the Screen, load from local storage - it's always way faster than via internet.