function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Stefan FellnerStefan Fellner 

Delete Contacts on SyncDown

Hi,

based on the Android's SmartSyncExplorer App I am trying to delete a single contact on the android device which has been deleted through the web based application.
Everytime I syncDown newly added contacts are stored on the device BUT deleted contacts are kept in the smartStore.
Is there a way to accomblish this by setting a parameter or do I really have to change the SDK methods, such as SyncManager.syncDownSoql(...) ?

Thanks
bhariharanbhariharan
Please post Mobile SDK questions in our Google+ community here - https://plus.google.com/communities/114225252149514546445.
Gaurav KheterpalGaurav Kheterpal
You should try using the OVERWRITE mode that was introduced in the recently launched SDK 3.1

That should do it.

If my answer helps resolve your query, please mark it as the 'Best Answer' to benefit others and improve the overall quality of Discussion Forums.
Stefan FellnerStefan Fellner
Gaurav,

I am already using the OVERWRITE merge mode as a SyncOption, but Contacts that are already stored on the smartphone and are deleted afterwards through the Webinterface are kept in the smartstore.

Probably the OVERWRITE option is only working for Contacts that have been changed in terms of attribute values on both sides. And in this case the OVERWRITE option uses the attribute values from the central salesforce database!?

Can you clarify on that?
Stefan
Gaurav KheterpalGaurav Kheterpal
Yes, I think that's the way it's supposed to work.
Stefan FellnerStefan Fellner
I think it would be goog to have another option that considers deletion of contacts that are already on the phone but do NOT exist anymore in the central database!

Is this planned? If not I would have to modify the SDK on my own, which is not a long term approach.
Philip GuerreiroPhilip Guerreiro
I'm having the exact same issue, I need full sync back from offline to online, when a record gets deleted using the web portal it gets deleted from the smartstore.