Hi,
Currently we're using store.refresh(); to refresh the offline store which refreshes all the requests specified in configuration file.
But i want only specific request to be refreshed.
Is it possible to achieve this with SMP 3.0 SP05 android SDK.
[endpoint]
Name=OrderExample
prepopulate_offline_db=SHARED-ONLY
prepopulate_offline_db_interval=1440
indexed_type=SAPODataExample.CustomerType: Surname, GivenName
indexed_type=SAPODataExample.CustomerType: Address/Province, Address/City
[defining_request]
name=Customers
is_shared_data=N
[defining_request]
name=Orders
is_shared_data=N
[defining_request]
name=OrderItems
is_shared_data=N
[defining_request]
name=Products
is_shared_data=Y
refresh_interval=1440
For example in the above configuration i want to refresh/update only 'name=Customers' request.
Also i want to get only top 20 records which are modified recently.
Thanks,
Sukesh N
Regarding your question:
Yes it is possible todo what you are requesting:
1. Defining requests are configured on the server, but specified on the client. Therefore; on the client, the app should have a defining request with name “Customers”.
There is a refresh method which takes a list of defining requests names (refreshWithRefreshSubset on iOS). In Android, it is called refresh. So you need to use that function and pass in “Customers”.
2. You can’t refresh only the first 20, we don’t allow that. However, If you need to refresh a limited number of entities from a particular set, you need to split it up into two defining requests. For
example, if Customers in the Canada is a higher priority what you can do is have
two defining requests:
~/Customers?$filter=Country eq ‘Canada’
~/Customers?$filter=Country ne ‘Canada’
Thx
Former Member
Have a look at this write-up
Getting Started with the Offline Store for Android
Regards,
JK
Add a comment