Any way to make that code universal for other tasks I will add in later (a GP task for example) or do I have to use this code each time I show results for my tasks?
A better way to do this would be to set outSpatialReference on your findParams to match your map's spatial reference. For instance:
findParams = new esri.tasks.FindParameters();
findParams.returnGeometry = true;
findParams.layerIds = [9, 10, 11, 12, 13, 14, 15, 16, 17, 18];
findParams.searchFields = ["FARM_NAME", "LF_NAME", "COMPANY", "FACILITY", "NAME", "Company"];
findParams.outSpatialReference = map.spatialReference;
That way you don't need to do anything other than add the results to your map in your callback:
//Display results for Find tool
function showResults(results){
var markerSymbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_CIRCLE, 10, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255, 0, 0]), 1), new dojo.Color([0, 255, 0, 0.25]));
map.graphics.clear();
dojo.forEach(results, function(result){
var graphic = result.feature;
graphic.setSymbol(markerSymbol);
map.graphics.add(graphic);
});
}