when a user enter values in fields in the form and save ,it is sending a link in email to the approver. when the approver clicks that link,it should redirect him to the detail page of the corresponding record to approve.How to create the "Link " ?
You have to create Link using HTML <a> tag in your Email Template.
Important : Hit Kudos if this provides you with useful information and if this is what you where looking for then please mark it as a solution for other benefits.
Yes, It's Possible.... You can set it directly... see below Example of HTML Email Template for your reference.
Email Template:
<messaging:emailTemplate subject="test" recipientType="User" relatedToType="Account">
<messaging:htmlEmailBody >
<html>
<body>
<p>Dear {!recipient.name},</p>
<p>Below is a list of cases related to {!relatedTo.name}.</p>
<table border="0" >
<tr>
<th>Case Number</th><th>Origin</th>
<th>Creator Email</th><th>Status</th>
</tr>
<apex:repeat var="cx" value="{!relatedTo.Cases}">
<tr>
<td><a href ="https://na1.salesforce.com/{!cx.id}">{!cx.CaseNumber}</a></td>
<td>{!cx.Origin}</td>
<td>{!cx.Contact.email}</td>
<td>{!cx.Status}</td>
</tr>
</apex:repeat>
</table>
<p/>
</body>
</html>
</messaging:htmlEmailBody>
</messaging:emailTemplate>
Important : Hit Kudos if this provides you with useful information and if this is what you where looking for then please mark it as a solution for other benefits.
Hi,
You have to create Link using HTML <a> tag in your Email Template.
Important :
Hit Kudos if this provides you with useful information and if this is what you where looking for then please mark it as a solution for other benefits.
Thank You,
Hitesh Patel
SFDC Certified Developer & Administrator
My Blog:- http://mrjavascript.blogspot.in/
You can create a link in Apex controller of the visualforce page you want to redirect like this
String linkSend = 'https://c.ap1.visual.force.com/apex/VFPageName';
Then in the email body you can mention that variable.
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
I want to pass the recordID of the form which the user fills to the approver in the link, iS that possible?
Yes, It's Possible.... You can set it directly...
see below Example of HTML Email Template for your reference.
Email Template:
Important :
Hit Kudos if this provides you with useful information and if this is what you where looking for then please mark it as a solution for other benefits.
Thank You,
Hitesh Patel
SFDC Certified Developer & Administrator
My Blog:- http://mrjavascript.blogspot.in/
Yes possible.
The record you want to update in save method set that record Id in the string var.
Thanks
Thanks for your answers, I will try with these...
HI..
sorry...I forgot to mention that,i want to redirect to the vf page...tht link should be vf page link with the record id.
//Capture the recordID
String linkSend = 'https://c.ap1.visual.force.com/apex/VFPageName?id='+recordID;
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
can u put in simple sample code...
How are you inserting the form data?
INSERT objVar;
//Then write
String linkSend = 'https://c.ap1.visual.force.com/apex/VFPageName?id='+objVar.ID;
Then in the email body you can mention that variable.
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks