I have one object called Service Request, them I have a lookup field of Account with retrieves me the name.

In my email template I must show up:

Account: _______ & Account Code:______

My code so far is:

Account:{!Service_Request__c.Account__c} Account Code:{!Service_Request__c.Account__r.Account_code__c}

Then Account name is ok, but I couldn't get the account code. I've then went to developer console to validate the statement Account__r.Account_code__c and it returned me the codes perfectly!

After some researches I've figured out that my Account field show be master detail and not lookup, is that right? Why? How should I be able to achieve it?

I hope you can help me on that!

Thank you, Susane

  • It might be easier to just make that field a formula on your Service Request object. – Caspar Harmer Apr 2 '15 at 15:20
  • @CaspNZ thank you for you quick response. Do you think this is the only way? That is ok to me, but I also would like to raise alternatives of solution, before ask for changes in the object. Thank you! – susaneme Apr 2 '15 at 15:32

There is a request to enable cross-object formulas in email merge fields that has been there for 4 years, but apparently it's not on the roadmap here.

So yes, I can confirm, getting this data will require creation of a new formula field to hold this information as of April 2015.

Here's the relevant quote:

This request is not on our current roadmap, but we recognize it's value and the need for it.

We're currently exploring a related template revamp project (safe harbor) and if we move forward with that, we'll want to consider this request for development as part of that effort.

  • I didn't know how to reference this kind of need for better search results, but you got it. Thank you very much for such accuracy and quickness. Now lets wait this come true! Regards, – susaneme Apr 2 '15 at 16:21
  • Sorry I couldn't report any good news... – Caspar Harmer Apr 2 '15 at 17:10
  • but you helped me a lot sharing the idea page :) – susaneme Apr 2 '15 at 17:33

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.