You need to sign in to do that
Don't have an account?
scottious888
Email link back to custom object
I have a visualforce email template which looks like so:
I want to add a link back to view the custom object record but cannot figure out what to use.
I tried {!Touch__c.Link} (among many other things) but this does not work. Any suggestions?
<messaging:emailTemplate subject="A High Touch record has been assigned to you" recipientType="User" relatedToType="Touch__c">
<messaging:plainTextEmailBody>
The following High Touch record has been assigned to you.
{!recipient.Name}
Account: {!relatedTo.Account__c}
Type: {!relatedTo.Type__c}
Contact Name: {!relatedTo.Contact_Name__c}
Contact Phone: {!relatedTo.Contact_Phone__c}
Contact Email: {!relatedTo.Contact_Email__c}
Company News: {!relatedTo.Company_News__c}
Notes: {!relatedTo.Notes__c}
</messaging:plainTextEmailBody>
</messaging:emailTemplate>
I want to add a link back to view the custom object record but cannot figure out what to use.
I tried {!Touch__c.Link} (among many other things) but this does not work. Any suggestions?
I run into this before, it doesn't appear that Visualforce Templates have a "detail link" merge field like you find in the other email templates, so you can do something like this:
Hope that helps,
Sati
I was after a generic solution as the server name will change once I move from developer account to production.
A pity you still have to login though even if you are logged in already.
BTW i had to change the - to a ?
Many thanks,
Scott.
BTW if you find yourself hard coding urls etc you can be almost 99% certain that is not the correct way to go and that there is a supported solution...
Is this part of the 1%.... http://community.salesforce.com/sforce/board/message?board.id=Visualforce&message.id=5054 ?
From the moment I created that I knew it wasn't a good idea but I can't figure out the correct way to do this.
Message Edited by TehNrd on 01-15-2009 09:45 AM
So, I tried adding the code into a component but it did not recognise the relatedTo object. Where am I going wrong?
Thanks.