AnsweredAssumed Answered

dojo.deferred not returning correctly per Esri sample example

Question asked by jay.gregory on Oct 4, 2013
Latest reply on Mar 9, 2015 by mturnbullesriaustralia-com-au-esridist
I am following the instructions here:

My function:
function getContent(graphic) {
        var deferred = new dojo.Deferred();
        facID = graphic.attributes.FacilityID;
        console.log(facID);
        deferred = esri.request({
        url: "http://myserver.com/arcgis/rest/services/EON/Assets/MapServer/0/query",
        content:{
              where: "LocationID = '" + facID + "'",
              outFields: "*",
              f: "json"
           },
        callbackParamName: "callback",
        load: function(fset) {
           console.log(fset);
           deferred.callback("blahhh");
        },
        error: function(error) {
           deferred.errback("Error occurred while generating profile");
        }
        });
       return deferred;
  
      }


generates an error at the "return deferred" line.  The error is "Uncaught NotFoundError: An attempt was made to reference a Node in a context where it does not exist."

What do I need to do to make this work?

Outcomes