You need to sign in to do that
Don't have an account?
Mark Crooks
AIR Toolkit creating offline records - ArgumentError: Error #2004: One of the parameters is invalid.
Hi,
I'm creating an AIR app using the SalesForce AIR Toolkit following this tutorial.
https://developer.salesforce.com/page/Taking_Salesforce_Data_Offline_Using_Adobe_AIR
I have everything that I need working other than being able to create a new entry to the database when offline.
This is the code I use to create the new entry:
ArgumentError: Error #2004: One of the parameters is invalid.
Which relates to passing an SObject to the serializeObject function within AirConnection.as
The error occurs on this line:
objectBytes.writeObject(someObject);
I also found an issue posted on code.google which relates to the same issue but despite creating a svn checkout and updating my files to r31 I still get the same error:
https://code.google.com/p/force-flex/issues/detail?id=3
Would anyone have any suggestiosn on how I can resolve this last hurdle?
Many thanks, Mark
I'm creating an AIR app using the SalesForce AIR Toolkit following this tutorial.
https://developer.salesforce.com/page/Taking_Salesforce_Data_Offline_Using_Adobe_AIR
I have everything that I need working other than being able to create a new entry to the database when offline.
This is the code I use to create the new entry:
private function addContact(evt:MouseEvent):void { acc = new SObject('Customer__c'); acc.Name = nameTxt.text; acc.Percent__c = int(percentTxt.text); airConnection.create([acc], new AsyncResponder(addSuccess)); }When online the entry is added successfully but when offline I get the following error:
ArgumentError: Error #2004: One of the parameters is invalid.
Which relates to passing an SObject to the serializeObject function within AirConnection.as
public function serializeObject(someObject:Object):ByteArray { var objectBytes:ByteArray = new ByteArray(); objectBytes.writeObject(someObject); return objectBytes; }
The error occurs on this line:
objectBytes.writeObject(someObject);
I also found an issue posted on code.google which relates to the same issue but despite creating a svn checkout and updating my files to r31 I still get the same error:
https://code.google.com/p/force-flex/issues/detail?id=3
Would anyone have any suggestiosn on how I can resolve this last hurdle?
Many thanks, Mark