I'm trying to pass collection to overrided SObjectModel update function. If I pass primitives, I can get them in APEX. But if I pass nested collection, I got Unhandled Exception:
FATAL_ERROR System.UnexpectedException: null
VF:
<apex:remoteObjectModel name="TopicAssignment" fields="Id"
update="{!$RemoteAction.ROT.updateNew}"/>
...
var topicIds = ['0FT7A0000008WlWWAU', '0FT7A0000008WlWWKl'];
new SObjectModel.TopicAssignment().update([<Array of IDS>],
{mode:'saveTAssignment',plus:topicIds},callback);
Apex:
@RemoteAction
public static Map<String, Object> updateNew
(String type, List<String> recordIds, Map<String, Object> fieldMap) {
String mode = (String)fieldMap.get('mode');//works fine
fieldMap.get('plus')//throws exception
JSON.deserialize(fieldMap.get('plus'),List<Id>.class)//throws exception
How to get the list or map or any JS object/literal passed in the remote object override call?