var select = featureLayer.selectFeatures(query, esri.layers.FeatureLayer.SELECTION_NEW); select.then(function (features) { console.log("select features result: ", features); }
Songissimo, try using the selectFeatures function against your Feature Layer that you had previously applied setDefinitionExpression.
Code:var select = featureLayer.selectFeatures(query, esri.layers.FeatureLayer.SELECTION_NEW); select.then(function (features) { console.log("select features result: ", features); }
This is what I am using in my application do what you describe you are looking for.