I'm still having this issue and not sure how to proceed debugging it. Here is some more detail on what triggers the above exception:I create an object as follows. This only has attributes since the feature layer that is getting the new record is a stand alone table.
_accountObject=
{
"attributes":
{
"OBJECTID":null,
"LASTNAME":txtLastName.text,
"FIRSTNAME":txtFirstName.text,
"EMAILADDRESS":txtEmailAddress.text,
"PHONENUMBER":txtPhoneNumber.text,
"CREATIONDATE": new Date().toString(),
"LASTUPDATE": new Date().toString()
}
}
Then invoke the "applyedits" method against the _accountTable stand alone table FeatureLayer with the above object.
_accountTable.applyEdits([_accountObject], [], [], new AsyncResponder(applyEditsResults, applyEditsFault));
The exception noted in the OP is what comes next. Neither applyEditsResults or applyEditsFault get invoked.
TypeError: Error #1034: Type Coercion failed: cannot convert Object@ee7f749 to com.esri.ags.Graphic.
at com.esri.ags.layers::FeatureLayer/http://www.esri.com/2008/ags/internal::editHandler()
at mx.rpc::AsyncResponder/result()
at com.esri.ags.tasks::FeatureLayerTask/handleApplyEdits()
at Function/http://adobe.com/AS3/2006/builtin::call()
I've verified that the object referenced in the exception is "_accountObject".So, I'm not sure why the exception is happening since the feature layer object represents a table and not feature class... Why FeatureLayer.as is trying to convert it to a graphic is escaping me.Once again, it needs to be noted that I am using the Flex/AGS 2.4 API against 10.1 b2 AGS installation.