Skip to Content
0
Oct 04, 2019 at 11:19 AM

Offline mobile app will submit POST instead of MERGE during during sync process

83 Views

Hi,

I have followed the tutorial of creating Mobile app using Android studio with offline capability as well as only online capability. So i created 2 apps basically. Both of them are created using wizard and I did not do any program changes to the created app.

In an online app, I dont have any issue related to updating data in the backend server, all new data, as well as update data are properly saved into the table at the backend.

Now in offline app, I have problem where in everytime I created new data or update existing data, data wont be saved automatically at the backend, even when I tried to do the syncronization, data still not updated in the backend server.

I checked the log in SCP Mobile services, and found out that everytime the sync process was happend, at the backend, the system always do POST of OData service which causing an error.

I tried to replicate the update by directly executing the OData service using MERGE, using the exact data that coming from the mobile that was previously reported as error, then it was properly saved fine, and I can see the table was updated perfectly fine.

So, my question is, is this expected, meaning everytime we do the sync process, it will always do the POST?

How can I change the POST to MERGE in the created code so that everytime I try to sync, the system will do the MERGE in ODATA service.

Thanks

TJ