I came across this excellent post from the forums, where poster BlackMumba detailed how to add and retrieve the associated email records for a record. Inspired by the post, I’ve brought his solution here and expanded upon it to show other use cases. Here’s how you can do it.
To add a new email address, you can do the following:
If you want to retrieve the primary email address for a record, you can do this:
And to grab all the email addresses for a record, use this code: