• KarteekKumarM
  • NEWBIE
  • 30 Points
  • Member since 2010

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies

I have a non-VF email template that uses Opportunity.Link to insert the Opportunity's URL into the message.

 

I have another email template, a VF email template, and I'd like to insert the Opportunity's URL into that one too. The VF email template is defined like this:

 

 

<messaging:emailTemplate subject="My Subject" recipientType="User"
relatedToType="MyObject__c">

where MyObject__c has a field, MyOpp__c, that's a lookup to an Opportunity

 

The following tries don't work -- I can't even save the email template:

URL: {! RelatedTo.MyOpp__c.Link }

URL: {! RelatedTo.MyOpp__r.Link }

 

 I know I can hard-code the first part of the URL to refer to the production URL, but that's not right if I'm sending the email from the sandbox.

 

Is there any (good) way to get the full URL into a VF email template?

 

Thanks!

 

 

 

 

  • February 22, 2010
  • Like
  • 0

Hi,

 

I am creating Visualforce Email Template. In that i want to construct the URL using a custom object.

For example : <<URL of the org>>/Object.id

 

How can we get the current orgs URL as different orgs have different domains like na1, na2, tapp0 ?

 

Can anyone help me in getting the organizations URL? 

 

Regards,

Imran

I have a non-VF email template that uses Opportunity.Link to insert the Opportunity's URL into the message.

 

I have another email template, a VF email template, and I'd like to insert the Opportunity's URL into that one too. The VF email template is defined like this:

 

 

<messaging:emailTemplate subject="My Subject" recipientType="User"
relatedToType="MyObject__c">

where MyObject__c has a field, MyOpp__c, that's a lookup to an Opportunity

 

The following tries don't work -- I can't even save the email template:

URL: {! RelatedTo.MyOpp__c.Link }

URL: {! RelatedTo.MyOpp__r.Link }

 

 I know I can hard-code the first part of the URL to refer to the production URL, but that's not right if I'm sending the email from the sandbox.

 

Is there any (good) way to get the full URL into a VF email template?

 

Thanks!

 

 

 

 

  • February 22, 2010
  • Like
  • 0