function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
David_RDavid_R 

mass emails using joins

This is not exactly a "development"  question - yet - but it seemed best to post it here first.  I have a custom object, applications (like in applications that people fill out for a grant, etc) and the applicant on the application record is a contact.  I want to mass email contacts that have applications of certain kinds, such as having applied for a specific type of grant, and I can't see how to create a view where such a join could be done.  The SQL would be something like "select name, email from contact c left join application a on c.contactid = a.contactid where a.app_type = 'grant_type_x'.  Is there any way this can be done out of the box?  I'm relatively new to Salesforce but have lots of experience with MS CRM where these kinds of queries (views) are not a problem and assumed I would find similar functionality in Salesforce but can't find it yet, if it exists.  Thanks.

Hengky IlawanHengky Ilawan

You should have a contact lookup field in your Applications object,

so  just simply query this way to get the emails:

 

SELECT Contact__r.Email FROM Application__c WHERE Type__c = 'A' AND etc....

 

-Hengky-

David_RDavid_R

Thanks Hengky.  I understand how the query would work, but from the user interface, how would the user actually do a mass emailing based on values in the related records.  The views that can be created in Salesforce by the user don't seem to support this.  Thanks.