3

I'm trying to add a detail link to an HTML Email template, to link to a related record on the object being merged into the e-mail.

I am aware of the process for adding a link/detail link for the object in the template by using

{!Communication__c.Link}

But my Communication object has a lookup to a Case called ParentId__c (which I can be sure is not null..) and I want to link to THIS object... my initial thought was to use

{!Communication__c.ParentId__r.Link} 

and it would traverse the relationship, and then merge out the Link value as with other objects, but this has not worked.

I'd rather not "build" the URL using "company URL" etc. and I'd like to avoid adding more custom fields to the object, but if these sorts of ideas are our only option...so be it.

3

From what I remember standard emails (= non-Visualforce ones) will give you hard time when you want to use more than one dot to go "up".

I'm aware of only 2 workarounds you have mentioned:

  • a helper formula field (type = URL maybe? so it's at least a bit reusable); I've created "Case Contact's Phone" etc that way in the past
  • craft the URL by hand using the trick described in Detail page link under email template
  • Yep. It was the @BobBuzzard post that we used in the end. A formula field on the object with the "left" function and the servlet URL. not an ideal approach, but solid and functional! – Simon Lawrence Apr 17 '14 at 20:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.