AnsweredAssumed Answered

Adding a feature to an offline geodatabase using GeodatabaseFeatureTable::addFeature

Question asked by KGorton-esristaff Employee on Mar 23, 2016
Latest reply on Mar 29, 2016 by LDanzinger-esristaff

In my app I have enabled adding features to a hosted feature service by following the examples of the sample apps "Add and edit features" and "Local geodatabase editing". Based on the example of "Add and edit features" if I edit the service directly using  GeodatabaseFeatureServiceTable::addFeature passing in the feature JSON I create for the feature to be added, it works. The result is the OBJECTID of the new feature.

However, if I create an offline geodatabase of the same feature service as in "Local geodatabase editing" and add a feature to it using GeodatabaseFeatureTable::addFeature passing in the same feature JSON, it fails. The result is always -1.

What am I doing wrong?