Hot answers tagged

4

In the given scenario, serialization occurs twice in the last three lines, and it is a cause of an observed scenario. A better way to approach this could be using of Map<String, Object> instead of Map<String, String> and perform serialization once. It would works since any entity is an Object. For example: Map<String, Object> mapToSerialize ...


1

That's expected. When you try to print out a javascript object on the page you'd get [object Object] - https://www.w3schools.com/js/js_object_display.asp Your map is most likely reaching the lightning component. Did you check the console.log output in the browser ? Please put the output here for more clarity. If all is well, you should be able to see the Map ...


1

This shall work perfectly with above method. @isTest private static void testSendMail(){ List<Map<Object, Object>> jsonMap = new List<Map<Object, Object>>(); Map<Object, Object> tempMap = new Map<Object, Object>(); tempMap.put('title' , 'Title1'); tempMap.put('link' , 'https://www....


1

Just use get method as you would on SObject. AggregateResult aggregateRecord = aggregates.get(...); Date aggregateValue = (Date)aggregateRecord.get('dateMax'); If you hadn't given the field an alias, it would instead be .get('expr0').


Only top voted, non community-wiki answers of a minimum length are eligible