I am attempting to applyEdits of a record for a related table that is being updated. My steps are to first set the attributes using record.setAttributes(attributes); I've included all the attributes (including the ObjectID). I then run applyEdits on the proper feature layer. Most of the time it works. Occasionally, however, I receive the following error: "Cannot read property 'attributes' of undefined". I've noticed that even though I receive this error message, the update still works. And as I mentioned above, this doesn't occur every time. Thoughts on why I'm getting this, and how to adjust my code so that this never occurs?