Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 72687

A map is a collection of key-value pairs where each unique key maps to a single value.

0 votes
0 answers
439 views

Populating a Map<Id,List<Contact>> for a comparison

What I am trying to do here is populate a list from a callout to Looker (BI Tool) then create a Map of Salesforce Account IDs to associated Contact Emails. … To do this I created this method: public static Map<Id, List<Contact>> lookerById() { List<Contact> lookerList = zuoraContactSync.mergeList(); system.debug(lookerList); Map<Id, List<Contact>> …
Randy B.'s user avatar
  • 139
0 votes
1 answer
916 views

Iterating Through a Map<Id, List<Contact>>

I am trying to iterate through the list from the query and the list from the map as they share the key. … Sample data of the Map<Id, List<Contact>> taken from debug log. …
Randy B.'s user avatar
  • 139
0 votes
3 answers
1k views

Setting a Map value within a method for a unit test

I have a method kind of like this: public static List<Contact> newContacts() { List<Contact> syncList = new List<Contact>(); Map<Id, Set<String>> lookerByIds = new Map<Id, Set<String>> … Contact WHERE AccountId IN : lookerByIds.keySet()]; //other code } I want to test this and all the logic in it but how do I set the value of the Map within the unit test? …
Randy B.'s user avatar
  • 139
0 votes
1 answer
913 views

Map<ID, Set<String>> Loop Question

I have a Map<Id,Set<String>> In my code. …
Randy B.'s user avatar
  • 139
1 vote
1 answer
62 views

For loop conditional statement for if a List<Contact> contains an element

lookerByIds is a Map<Id, List<Contact>> So the intent here is that each element of the sfdcList for a given Id is checked against a list of contacts by Id. …
Randy B.'s user avatar
  • 139