Skip to main content
added 216 characters in body
Source Link

You'll typically have to serialize any data you're bringing back from the server. Try changing your return type to a String and returning the serialized array to the client. Then JSON.parse() the returned string into an array in the client js.

UPDATE:

I misunderstood that the flow of your code is going from client to server. I believe adding an sObjectType property to the javascript object will resolve the issue, per @nbrown's suggestion.

You'll typically have to serialize any data you're bringing back from the server. Try changing your return type to a String and returning the serialized array to the client. Then JSON.parse() the returned string into an array in the client js.

You'll typically have to serialize any data you're bringing back from the server. Try changing your return type to a String and returning the serialized array to the client. Then JSON.parse() the returned string into an array in the client js.

UPDATE:

I misunderstood that the flow of your code is going from client to server. I believe adding an sObjectType property to the javascript object will resolve the issue, per @nbrown's suggestion.

Source Link

You'll typically have to serialize any data you're bringing back from the server. Try changing your return type to a String and returning the serialized array to the client. Then JSON.parse() the returned string into an array in the client js.