Create a List
Follow Along with Trail Together
Want to follow along with an expert as you work through this step? Take a look at this video, part of the Trail Together series.
(This clip starts at the 13:30 minute mark, in case you want to rewind and watch the beginning of the step again.)
Create and Adjust the List
Instantiate a list named bankAccts and add the two BankAcct objects to the list.
- Open the Execute Anonymous window.
- Replace the existing code with this code:
- Verify that Open Log is selected and then click Execute. The execution log opens.
- Select Debug Only.
- Review the debug messages and then close the log.
In the createContact method, instantiate a Contact List object and accept a Candidate List object named candsFromTrigger as the argument.
- In the Developer Console, open the CreateContactFromCan class and replace the existing code with this code:
- Save the CreateContactFromCan class.