Select to view content in your preferred language

Attachment- flex mobile add attachment by  addAttachment()

537
0
03-06-2014 06:38 AM
MikeDahm
Frequent Contributor
I am working with a flex mobile project and trying to add an attachment to a feature layer.  I get an error when I try to run the following code:
signInspectionFeature.addAttachment(selectedSignInspection.attributes["OBJECTID"], bytes, imageUpdateName);


The error is:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
 at Function/com.esri.ags.tasks:FeatureLayerTask/addAttachment/com.esri.ags.tasks:onComplete()
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at com.esri.ags.utils::MultipartURLLoader/onComplete()
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at flash.net::URLLoader/onComplete()



I have checked the bytes variable that is a bytes array and it has all the required data (bytes available etc. correct).  I don't have access to FeatureLayerTask.as so I do not know what line 529 is looking for.
Tags (2)
0 Kudos
0 Replies