AnsweredAssumed Answered

Update Feature  Error

Question asked by Nadir_Hussain on May 22, 2019
Latest reply on Jun 11, 2019 by Nadir_Hussain

Dear all,

 i am trying to update a feature using feature service.My geodatabase is versioned.below is my code 

var UpdateAttr = {
اسم_الشركة: test_2,
Mineral :validFeature.attributes.Mineral,
Geologist : validFeature.attributes.Geologist,
Duration : validFeature.attributes.Duration,
End_Date : validFeature.attributes.End_Date,//"",
Decision_Type :validFeature.attributes.Decision_Type,//"",
Location : validFeature.attributes.Location,//
Decision_Date : validFeature.attributes.Decision_Date,//"",
Decision_No : validFeature.attributes.Decision_Date,//"",
Visible_Code :validFeature.attributes.Visible_Code,//"",
Emirat_Code : validFeature.attributes.Emirat_Code,//
Mineral_Code : validFeature.attributes.Mineral_Code,//"",
Complex_Code : validFeature.attributes.Complex_Code,//"",
City_Code :validFeature.attributes.City_Code,//"",
Status_Code :validFeature.attributes.Status_Code,
Emirate : validFeature.attributes.Emirate,*/
Governorate : "ddd",
};
var UpdateValidLayer = new esri.layers.FeatureLayer(featureServiceValidURl);
var MyUpdateGraphic = new esri.Graphic(null, null, UpdateAttr);
var updateFeatures = [];
updateFeatures.push(MyUpdateGraphic);
UpdateValidLayer.applyEdits(null, updateFeatures, null, function (addResults, updateResults, deleteResults) {
  dynamicMapServiceLayer.refresh();
  console.log("Apply Edits Successfully:");
  alert("updated Successfully");
}, function (err) {
alert(err.message+"___"+err.code+"_________"+err.id);
console.log("Apply Edits Failed: ",err.message+err.code);
});

Always through error "Unabale to complete operation.Error Code is 400".i have this code many times in my other projects.But this time throwing error.

i also try to update feature using arcgis server webinterface.it works from the webinterface.so

Pls help.Thanks is advance.

Outcomes