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
Mark VermaatMark Vermaat 

Cross object referencing

OK, this is starting to be painful.  I was tasked with setting up an email alert for when one of our Technicians training is about to expire.  I was trying to do this with just the typical email template however I have only been able to get 90% of the way there. 


The email alert has to contact specific people, and the only person I can't get it to contact is the Field Tech.


To explain how this works, I have the email setup on the Contact object, but the field rep is on the Account object.  I need to be able to bring in the email address of the field tech from the account object to the Contact object.  Adding a lookup field on the Contact is not an option.  Anyone have suggestions?  I am not against having to code something, but honestly don't even know where to start.  


Any suggestions from anyone would be appreciated.



One viable (but dirty alternative) in this case would be setting up a redundant Email field on Contact that gets stamped with the Account Field Tech field. This field will then be used in your email alert.
Please make sure you run a one time batch to update this new field on all Contacts with the relevant Account Field Tech values. Then setup a workflow to do this for all ongoing Contact record changes.

Hello Mark,


I would suggest 2 ways of doing this, depending on what is more suitable for your organization:


- Option 1 (assuming you are not using field "Reports To" on Contact): for each of the contacts that may fire this email, make sure you fulfill field "Reports To" with the user that corresponds to the account tech. Then, on your email alert select "Related Contact" as the recipient type.


- Option 2: create a new email field on Contact and have it populated using a trigger on Contact. Then, on your email alert select "Email Field" as the recipient type.


Each option has its advantages and disadvantages, but i hope of of them serves your purpose.

Best regards.

Hello Mark,
Could you give kudos to my reply (click the star), if it helped you?