Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test references most recently recreated issue, instructions say "first contact #1

Open
walters954 opened this issue Oct 2, 2024 · 1 comment
Assignees

Comments

@walters954
Copy link
Collaborator

https://github.com/Cloud-Code-Academy/developer-kickstart-cohort6-module5-soql-developer-kickstart-week5/blob/813548415592aa7a4ad5ca1b328afe8704b58df0/force-app/main/default/classes/SOQLTest.cls#L748

Question 25

Most people seem to be trying to get only the first contact on the account. They are checking from their query they have only the first contact. This seems to be more accurate solution. This should probably be changed to testContact1

for (Contact contact : accountContacts) { // Add the first contact for each account to the map if (!accountToContactMap.containsKey(contact.AccountId)) { accountToContactMap.put(contact.AccountId, contact); }

@walters954
Copy link
Collaborator Author

@cyberjus updated description

* Example: if there are two Contacts on the Account, "Billy" and "Abby," the 'Primary_Contact__c' will be set to "Abby."

And updated test method
static void testSetPrimaryContact() {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants