Is there a simple call from arcgis javascript api 4.x to delete all records from a feature class
Solved! Go to Solution.
Jay,
This is the only way I know how.
Jay,
This is the only way I know how.
Perfect
Is there a way to get an alert when the applyEdits is completed or successful? Want to verify its done and then write to the same FC.
Jay,
Sure, applyEdits returns a promise.
featureLayer.queryFeatures().then(function(results){
featureLayer.applyEdits({deleteFeatures: results.features}).then(results){
//do something here
}
});
hmmmm..
I added a ; at the end of appyEdits but no go...
featureLayer.queryFeatures().then(function(results){
featureLayer.applyEdits({deleteFeatures: results.features}).then(results){
//do something here
};
});
Jay, sorry for the bad code I forgot the function part.
featureLayer.queryFeatures().then(function(results){
featureLayer.applyEdits({deleteFeatures: results.features}).then(function(results2){
//do something here
});
});
think I got it with this
featureLayer.queryFeatures().then(function (results) {
featureLayer.applyEdits({ deleteFeatures: results.features }).then(function (results) {
alert("Im done and now building the multipart features");
});
});