I have a lightning component which enqueues server side action. To that action I need to pass a map as one of the parameters, but it looks like it takes memory address of the object instead.
The client side code that creates the map and calls the server side action:
var action = cmp.get("c.save");
var mapToSend = new Map()
for (var key of valueMap.keys()) {
mapToSend.set(key, valueMap.get(key))
}
action.setParams({
"name": cmp.get("v.name"),
"params": mapToSend
});
In the controller then:
public static Boolean save(String name, Map<String, Object> params) {
log of the javascript shows nice Map
with all the correct fields, but salesforce system log shows just
14:55:16.0 (3172304)|VARIABLE_SCOPE_BEGIN|[41]|name|String|false|false
14:55:16.0 (3188041)|VARIABLE_ASSIGNMENT|[41]|name|"Account"
14:55:16.0 (3191758)|VARIABLE_SCOPE_BEGIN|[41]|params|Map<String,ANY>|true|false
14:55:16.0 (3204719)|VARIABLE_ASSIGNMENT|[41]|params|{}|0x30d2397a
Any Idea why? What those |false|false
and |true|false
mean in the logs?