AnsweredAssumed Answered

Error on applyEdits

Question asked by JStafurikesriaustralia-com-au-esridist Employee on Jan 19, 2016
Latest reply on Feb 4, 2016 by rscheitlin

Hi,

 

I'm trying to update an attribute via a feature service, but keep getting an error 'TypeError: n.setAttributes is not a function at a._editHandler'.  I'm using JS API 3.15.  Although the error is returned, the attribute is updated successfully.

 

Code:

 

var attr = {status: 0, OBJECTID: 1};

var edits = [{attributes: attr}];

 

var def = statusFeatureLayer.applyEdits(null, edits, null);

 

def.then(function(result) {

console.log(result);

}, function(error) {

console.log(error);  <-- TypeError: n.setAttributes is not a function at a._editHandler

});

 

Any ideas what could be causing this error?  I've also tried using JS API version 3.14, but got the same error.

 

Thanks,

  Jerry

Outcomes