[SalesForce] Email Template related record not available

I'm building an email template, and I want to use merge fields from either a Lead or Contact but I also want to use a related record.

I copy the desired merge fields into my template in the web-ui editor, however, when I go to send a test, I select a Contact, but in the drop-down for related records, I don't see the custom object I'm looking for as an available record type to search on. I do see other custom types that I have but don't want to use…?

Also…

If I want to build a dynamic URL for a link in the email body with the html editor, and this link is based on some of the merge fields how do I enter them? The html body of the email shows the HTML in the merge fields in the WSIWYG editor for HTML templates. It has a weblink editor – but I'm not sure where to merge the un-encoded email with merge fields, like so…ok I think I found this in the email template in the IDE…!

<a href="{!sObject__c.MergeField__c}">{!sObject.Name}</a>

Best Answer

Check the 'Allow Activities' checkbox under the Optional Features section on the custom Object's edit page. If you do not have that checked then the Object won't come up in the Related to Record picklist. I don't recall in which documentation I read that, but I just verified it in my DE. My quick search found this knowledge article.