AnsweredAssumed Answered

Solved: Problem Updating ArcGISFeatureLayer

Question asked by KevinGebhardt86 on Jan 31, 2013
Latest reply on Jan 31, 2013 by KevinGebhardt86
Hello,
I have a problem when i'm trying to update my featurelayer after changing the position or some attribute values of a feature.
Here is my code:
First i'm retrieving the updated graphics from my local database:
ArcGISFeatureLayer syncLayer = new ArcGISFeatureLayer("http://<server>/ArcGIS/rest/services/<directory>/<service>/FeatureServer/0",o,cred);      
edits = builder.getBaumdatenAsGraphic(getApplicationContext(), "1",new Hashtable<String,Object>());

In this method im filling the Hashtable with values:
map.put("OBJECTID", baeume.get(i).getOBJECTID());
map.put(BK_BAEUME_ADATUM, baeume.get(i).getADatum());

And afterwards i'm generating the Graphic:
InfoTemplate info = new InfoTemplate();
graphics[i] = new Graphic(new Point(baeume.get(i).getX(),baeume.get(i).getY()),pms,map,info);

Then i'm calling applyEdits from my FeatureLayer:
syncLayer.applyEdits(adds, deletes, edits, new CallbackListener<FeatureEditResult[][]>(){
// some Callback-Handling
});

On my device i get now the message:
[objectid=-32648,globalid=null, success=false,error=FeatureEditError[code=-1, description=Update for the object was not attempted. Object may not exists.]]
It's possible that the objectid is incorrect? I retrieve it from the featurelayer when initializing the data.

Thanks in advance

Outcomes