AnsweredAssumed Answered

FindTask returns "Object reference not set to an instance of an object"

Question asked by mrcoulson on Sep 5, 2012
Latest reply on Sep 20, 2012 by geos_rfleet
Hello.  We have a project for which this example seems to be an excellent starting place: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/find_map.html

So far, we have made revisions in an attempt to include our data.  This is at http://www.co.frederick.va.us/dev/maps/test4.html.  Instead of the stuff in the example, we are trying to search for a field in our data called RECNUM.  Our data are in this service: http://gis.co.frederick.va.us/ArcGIS/rest/services/Values_PF/MapServer/1

We currently are getting this error when trying to execute a search:

dojo.io.script.jsonp_dojoIoScript2._jsonpCallback({"error":{"code":500,"message":"Object reference not set to an instance of an object.","details":[]}});


I'm totally unsure of what is happening.  When I change the findParams.layerIds from 1 to 0, I just get empty data instead of an error result. 

dojo.io.script.jsonp_dojoIoScript2._jsonpCallback({"results":[]});


findParams.layerIds = [1]; // 0 returns empty result.  1 returns Object reference not set to an instance of an object. findParams.searchFields = ["RECNUM"];


I'm kind of lost on how to proceed, so I'll be deeply grateful for any assistance.  Thanks!

Jeremy

Outcomes