I have a formula field on custom object called "RE_Opps with AccountID". This formula field is a link to one of the reports. The formula goes like this

    HYPERLINK("/00O130000090Ae6","Opportunity Report"),
  HYPERLINK("/00O130000090AdD?pv0="&Customer_Account__c,"Opportunity Report")

I have created an email template which holds the details on the custom object except "RE_Opps with AccountID". I want this field to be shown in email like an output link. Can someone tell me how to do it.

RE_Opps with AccountID: <i> 
                       FIND('.com',$Api.Partner_Server_URL_140)+4) +
      </apex:outputlink>  </i>

I tried it this way but it doesn't work. Any help is appreciated.


You will need an intermediate formula field that is the /reportId?params

Report_URL__c = IF (Regional_Account_Assigned__c,
                    "/00O130000090AdD?pv0=" & Customer_Account__c

and change your hyperlink formula field to:

HYPERLINK(Report_URL__c,"Opportunity Report")

then, your Email template can use:

RE_Opps with AccountID: <i> 
                   FIND('.com',$Api.Partner_Server_URL_370)+4) +
                        Opportunity Report
  </apex:outputlink>  </i>

This all presumes the recipient is a Salesforce user. Non-users can't view SFDC reports

| improve this answer | |
  • @Harvey My pleasure, as a service to the Community, once you're happy with the answer, mark it as the answer. – cropredy Sep 2 '16 at 17:55

Your Answer

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