on 11-21-2019 4:04 PM
Hi
I am using both offline and online services in the application,i have added the two services on application onlaunch event and given the oninitialization action on ondidupdate event, the offline service is working fine but the online service is not working, can any one tell me the reason ? or is this the correct way?
Each service in your applications needs to be initialized / opened independently. For Offline services that means calling Initialize for the service to specify the defining requests and download the data (first time only). For an online OData service this means calling CreateService and OpenService before attempting to access the service.
Since OnDidUpdate only takes a since action/rule, I would probably call my Initialize action (in both OnDidUpdate and OnLoaded) and in the OnSuccess chain the Create Service and the Open Service with a final message action to indicate the data services are initialized.
Then when targeting controls in the pages you can specify which service/entity set the control is associated to. Remember, be careful when working with the same data using the offline and online services since you can easily end up out of sync.
--Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot Master!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
11 | |
10 | |
8 | |
8 | |
6 | |
6 | |
6 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.