AnsweredAssumed Answered

adding new record using feature layer

Question asked by Nadir_Hussain on Apr 7, 2016
Latest reply on Jun 15, 2016 by rscheitlin

Dear All the below code is adding new record in my feature layer

var officeFeatureLayer=new esri.layers.FeatureLayer("http://myserver/arcgis/rest/services/myservice/FeatureServer/0");

      var mp=esri.geometry.webMercatorToGeographic(evt.mapPoint);

      var pt = new esri.geometry.Point(evt.mapPoint.x, evt.mapPoint.y, new esri.SpatialReference({ wkid: 4326 }));

       var myGeom  = esri.geometry.geographicToWebMercator(pt);


        var attr = {"x_coordinate":evt.mapPoint.x,"y_coordinate":evt.mapPoint.y,"office_id":"1000",office_nam:" new office"};

         var addGraphic = new esri.Graphic(pt,null,attr,null);

           officeFeatureLayer.applyEdits([addGraphic], null, null, function (adds, updates, deletes) {


                                 alert("Added feature successfully<br />OBJECTID: " + adds[0].objectId );


when i execute the code my alert give me message successfully and objectID give me the exact id of total number of records in feature class plus one.but i could not find the record where it is going in geodatabase.Any idea in whice table it is stored.i am not using any attribute inspector.i have my own custom form from whict i am getting my values.please help.


thanks in advance.