JS API v3
docs say the 3rd param is
<Graphic[]> deletes, and the only specified requirement is "Array of features to delete. Must have valid ObjectId"
const toDelete = new esriJS.EsriGraphic();
toDelete.setAttributes({})
toDelete.attributes.objectid = objectid;
const featureLayer = new esriJS.FeatureLayer(featureLayerUrl);
featureLayer.applyEdits(null, null, [toDelete],
(adds, updates, deletes) => {
resolve(deletes);
},
err => {
console.log(err);
debugger
reject(err);
});
(my layer's objectIdField is called objectid (all lower case)).
I can see that the function makes the POST but ignores the [toDelete] parameter that was passed in. What am I doing wrong?