Very new to Salesforce but not new to SQL guy here. I'm just wondering what method I could use to create a button in a custom object that would query a junction object for the other related object's email fields, then format them into a nice text list.
My schema is like this http://puu.sh/sNqAN/7240986c30.png. I want to be able to hit a button called "Make email list" or something in the tab of any given Interest Group, and be able to have that instance query all its junction objects for the emails in their contact fields, then return the result and do something with it. My general need is to either create a mailing list that can be fed into MailChimp (the current mailing software that the nonprofit I'm working for are using) or otherwise produce a result that the staff could use to help organize their mass emails. The company does have MailChimp integrated into Salesforce at least partially, so if there's a way to just go directly from "Button Press -> (bunch of scripting and queries) -> Mailchimp List" that would be absolutely fantastic.
Any help would be great, and thanks in advace.