I am trying to implement some offline functionaluty and all of my searching has not yielded answers so I thought I would see if anyone here can help.
We have a 75K+ data source (a CDS Entity) that I am able to bring into a collection on a mobile device. When connected - I have all the functionaluty to pass data from this collection to CDS with no problem. The problem arises with some offline capabiliuty I need to incorporate into the device.
I need to be able to:
take the collection and save it to a cahced copy on the device (SaveData function).
When the user access the app again - I would like the app to look at the CDS entity last modifued date and compare it to the local cahced copy saved date.
The app will then notify the user if there is newer data availalbe online (CDS entity) and provide the oprion to download the data again or use the local cached copy
I do not see any clear way of comparing CDS Entiry create/modify dates and SaveData copy create dates.
When App is connected, use the sort or sortbycolumns function to sort the CDS entity by the Modified date, then get the first or the last record, which should depend on hte sort, then use it to compare the saved date offline.
The offline saved date should be better kept in a global variable, as the modified date saved in the collection won't be updated automatically when the data saved offline.
Community Support Team _ Michael Shao If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.