Solved! Go to Solution.
featureLayer.applyEdits([newGraphic], null, null, function (res) {
// res is of type FeatureEditResult.
// Need to query *again* to get the new object from its ID.
// ORLY? YARLY.
on.once(featureLayer, 'update-end', function(error, info){
var query = new Query();
query.objectIds = [res[0].objectId];
featureLayer.selectFeatures(query, FeatureLayer.SELECTION_NEW, function (result) {
// Your stuff here, or in the callback function.
if (typeof(mycallbackfunction) == "function") {
return mycallbackfunction(newGraphic);
}
});
});
// Fire the layer update.
featureLayer.refresh();
});