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
Murugan P 9Murugan P 9 

Server delete changes not reflected in local when I used Salesforce smart sync library for Android

I am developing Android native application for Salesforce. I used Salesforce SDK. Using SmartSync library we can sync the records from server to local and local to server. If I deleted a record in server and the same record I made some changes in local. If I proceed sync, that locally changed the record reached to server instead of delete in locally. Thats the issue which I am facing. My requirement is to delete the record in local If that same record deleted in server even I made changes in locally. Anyone help me.
Steve ThistleSteve Thistle
Hi Murugan, 

I found this article which may help you delete your ghost record issue.

There is also a MergeMode enum which controls how records with modifications remotly and locally are handled. Setting this value to MergeMode.LEAVE_IF_CHANGED should prevent new records from being created in the case of a local modification and remote delete.

I hope this helps.