تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
4223 أدوات العرض

Using v2.3.0 (Build 7) of framework.

I can't find a way to update and sync with the server a single field from the ones set in my model class. I need this when I update this field on mobile to prevent the other fields from being overrided on server with outdated data (from application) that has just changed on server, if an auto sync didn't happen on application before it. I also tried to make a preventive requestSync before attempting to update and sync the data, but my onSyncFinished model callback (for updating my field and re-syncing from that moment) isn't working. Neither running quickSyncRecords in an AsyncTask thread did work, that method seems to get stuck, stopping the thread flow.

How to achieve this? At least if it isn't possible I would like to know if I can send a raw query to the server.
Thanks!

الصورة الرمزية
إهمال
الكاتب أفضل إجابة

After trying to find other solutions and looking at the documentation I was able to send a raw query to the server updating this specific field, and I can see the change on server. But now the application hangs when I call the update function and I don't know why yet.


maintenanceWorkOrder.getServerDataHelper().updateOnServer(values, row.getInt("id"));


Edit: I finally solved it by wrapping this call inside an AsyncTask anonymous object. Thanks!

الصورة الرمزية
إهمال

Hello, can I ask how did you manage to sync your data to server? I'm currently stuck on this.

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
يوليو 18
3234
1
نوفمبر 16
5253
0
أكتوبر 16
4132
0
أكتوبر 15
3582
0
يناير 21
3001