Sync error when removing a feature with an attachment while offline

4327
1
06-22-2014 02:50 PM
GeospatialSolutions
New Contributor II
Hi all,

I am working on an application using offline editing/sync and have run into an issue when trying to remove a feature with an attachment while offline and then trying to sync with the feature server.

The error message I receive when trying to sync is:

Unable to synchronize replica., The specified attachments could not be edited or does not exist.


Some workflows that I've tested to get a further understanding of the error:

1. The feature server is downloaded to an offline geodatabase which contains features that have attachments. The feature with an attachment is deleted, but first all of the attachments are deleted (from the GeodatabaseFeatureTable). A sync is attempted (bi-directional) and it fails with the aforementioned error message.

2. The feature server is downloaded as before. All of the attachments associated with a particular feature is deleted. A sync is attempted and succeeds. The feature server is re-downloaded and the previously mentioned feature is deleted locally. When a sync is attempted, it succeeds.

Therefore, the error only occurs when a feature that has attachments at the time it's feature server was taken offline is deleted from the geodatabase and a sync is attempted. The error occurs even though all of the associated attachments were deleted from the GeodatabaseFeatureTable prior to deleting the feature.

If anyone has encountered this error and knows a workaround or the proper way to sync when a feature with attachments is deleted, your help would be much appreciated.

Thanks
0 Kudos
1 Reply
YeongShih
New Contributor

Could you please show me how to remove all attachments from a feature while in offline edit.

We process the attachment name and save it to local device but don't want to sync to server.

Please advise. Thanks!

0 Kudos