All Questions
2 questions
10
votes
2
answers
12k
views
What is the best way to cast/convert Map<String, SObject> to Map<Object, Object> and back again?
To reduce code duplication, at the risk of type safety, I have some method:
public Map<Object, Object> doSomething(Map<Object, Object> inputMap) {
Map<Object, Object> outputMap;
...
2
votes
1
answer
79
views
How can I abstract building maps from SObject Lists in a good way? [duplicate]
I frequently find I want/need to map a list of SObjects by a value other than it's own Id.
So, I'd like to abstract this process to make it reusable.
For example, I might want to map Contacts by ...