I am using the ArcGISDynamicMapServiceLayer to load my layers into the map in ArcGIS API for JavaScript 3.19.
I have set up the IdentifyTask, and it works great except for one problem. I allow the end-user to search on a date range which sets a definition query to only display those features. However, the identify popup includes those features that are being excluded using the definition query.
How do I get an Identify popup for only those features that are visible because of the definition query?