-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
4Questions
-
1Replies
Is it possible to use URLFOR function in visualforce email template?
Hi ,
I am trying to create a visualforce template on an Task to send email to Users when insertion of task happens (used a trigger).
Please find the code as of the visualforce template referred by the trigger as below :
<messaging:emailTemplate subject=" Task Created" recipientType="User" relatedToType="Task" >
<messaging:htmlEmailBody >
<html>
<body>
Task Status : {!relatedTo.Status}<br/>
Task Subject : {!relatedTo.Subject} <br/>
Task Type : {!relatedTo.Type} <br/>
Task Description : {!relatedTo.Description}<br/>
Polos Order : {!relatedTo.Order__c} <br/>
Task id : {!relatedTo.id}<br/>
<apex:outputLink value="/{!relatedToid}">
Please click on link to View task in salesforce!
</apex:outputLink>
</body>
</html>
</messaging:htmlEmailBody>
</messaging:emailTemplate>
Please Note,I have to put a link(URL) of the Task. In the email to be sent so that the user receiveing it can click on the link and open up the task view.
There are two issues that I am facing :
1) All the task (relatedTo) merge fields are coming balnk in the email sent to users.
2) I want to use URLFOR function with the email template for outputlink but this seems to be thoring an exception : invalid paramater for URLFOR
<apex:outputLink value="{!urlFor($Action.Task.View, relatedTo.id)}">
PS :
1) I cannot seem to use the visualforce component for the same becoz I am not getting relatedTo.Id to pass to VF component.
2)Oddly this is happening only when actual trigger is fired and not when I click on send test and verify merge fields.
Could some body please help me with this issue.
Thanks in advance for help!!!
- manumolu
- June 06, 2013
- Like
- 0
- Continue reading or reply
Can we make a picklist field 'Required' at object level after it has been created and used in Apex
Hi,
I have an isse where I have a custom picklist field ' Company type' on Lead which has been created , used in Apex code and records for this lead has also been created.
Please help!!!
thanks in advance
Manu
- manumolu
- December 01, 2011
- Like
- 0
- Continue reading or reply
products and quotes
HI,
Could some one please suggest that how is it possible to capture salesforce product schedule information like the yearly revenue installments on quote templates.I see that in the quote template the product information has only the fields like 'has schedule' checkbox available for inclusion but what i need is the revenue split up between the number of installments to be able to appeaar on the template
like year1 year2 year3 year4
product1 xxx xxx xxx
product2 xxx xxx
any suggestion or help is greatly appreciated
regards,
- manumolu
- July 26, 2011
- Like
- 0
- Continue reading or reply
Inbound -- Outbound email messages in Sales force : ANY HELP WOULD BE APPRECIATED
Hi,
I am presently working with the inbound outbound email feature available in sales force.
My scenario looks like this I have a workflow which gets triggered when a "campaign member" associated with "campaign" has "status" changed to "sent". So the workflow generates an action (an email alert) is send to the campaign member's email id.. For the email alert I have created my own template with a calender invite in the form of .ics file attachment.
Till here everything is working fine i.e. the supposed alert is sent to respective campaign member's email id.
I have created a email service and associated it to email id (generated by salesforce) for receiving any response to the calender invite but I am not receiving any response to this particular email address in email service as the associated email handler class is not getting invoked.I am able to say this on the basis that I cannot see the incoming mails in the email log files which is obtained after using the "monitoring" option in the administration setup of salesforce.
Please could you provide me some help on this? Basically I want to know whether the incoming mails to email id (salesforce generated) in the email service, can be logged-in in the email logs?
I am attaching my email template for reference:
<messaging:emailTemplate relatedToType="CampaignMember"
replyTo="jaya@gmail.com"
subject=""
>
<messaging:plainTextEmailBody >
Dear {},
</messaging:plainTextEmailBody>
<messaging:attachment filename="meeting.ics" >
BEGIN:VCALENDAR
METHOD:REQUEST
PRODID:Microsoft CDO for Microsoft Exchange
VERSION:2.0
BEGIN:VTIMEZONE
TZID:GMT -0500 (Standard) / GMT -0400 (Daylight)
BEGIN:STANDARD
DTSTART:<apex:outputText value="{0,date,yyyyMMdd'T'HHmmss}">
<apex:param value="" />
</apex:outputText>
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010301T020000
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
DTSTAMP:20101217T140608
DTSTART;TZID="GMT -0500 (Standard) / GMT -0400 (Daylight)":<apex:outputText value="{0,date,yyyyMMdd'T'HHmmss}">
<apex:param value="" />
</apex:outputText>
SUMMARY:Test Message
UID:040000008200E00074C5B7101A82E00800000000C07DCFA4C99DCB01000000000000000
010000000584FE1BDDE8FF248BAB19BA4477C5AE2
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;RSVP=TRUE;CN= "name":MAILTO:mailto:eds@gmail.com
ORGANIZER;CN="CIO":MAILTO:inboundemaildemo@q-42mjlnch6w5taj0qh6d4hjnlj.in.salesforce.com
LOCATION:GTM
DTEND;TZID="GMT -0500 (Standard) / GMT -0400 (Daylight)":<apex:outputText value="{0,date,yyyyMMdd'T'HHmmss}">
<apex:param value="" />
</apex:outputText>
DESCRIPTION:
SEQUENCE:0
PRIORITY:5
CLASS:
CREATED:20101217T140326
LAST-MODIFIED:20101217T140340
STATUS:CONFIRMED
TRANSP:OPAQUE
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
X-MICROSOFT-CDO-INSTTYPE:1
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
X-MICROSOFT-CDO-IMPORTANCE:1
TZID:GMT -0500 (Standard) / GMT -0400 (Daylight)
BEGIN:STANDARD
DTSTART:<apex:outputText value="{0,date,yyyyMMdd'T'HHmmss}">
<apex:param value="" />
</apex:outputText>
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010301T020000
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
DTSTAMP:20101217T140608
DTSTART;TZID="GMT -0500 (Standard) / GMT -0400 (Daylight)":<apex:outputText value="{0,date,yyyyMMdd'T'HHmmss}">
<apex:param value="" />
</apex:outputText>
SUMMARY:Test Message
UID:040000008200E00074C5B7101A82E00800000000C07DCFA4C99DCB01000000000000000
010000000584FE1BDDE8FF248BAB19BA4477C5AE2
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;RSVP=TRUE;CN= "name":MAILTO:mailto:eds@gmail.com
ORGANIZER;CN="CIO":MAILTO:inboundemaildemo@q-42mjlnch6w5taj0qh6d4hjnlj.in.salesforce.com
LOCATION:GTM
DTEND;TZID="GMT -0500 (Standard) / GMT -0400 (Daylight)":<apex:outputText value="{0,date,yyyyMMdd'T'HHmmss}">
<apex:param value="" />
</apex:outputText>
DESCRIPTION:
SEQUENCE:0
PRIORITY:5
CLASS:
CREATED:20101217T140326
LAST-MODIFIED:20101217T140340
STATUS:CONFIRMED
TRANSP:OPAQUE
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
X-MICROSOFT-CDO-INSTTYPE:1
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
X-MICROSOFT-CDO-IMPORTANCE:1
and my email handler class is as follows :
global class EventInboundController implements Messaging.InboundEmailHandler {
global Messaging.InboundEmailResult handleInboundEmail(Messaging.InboundEmail email, Messaging.InboundEnvelope envelope) {
Messaging.InboundEmailResult result = new Messaging.InboundEmailresult();
String myPlainText= '';
String mySubjectText= '';
myPlainText = email.plainTextBody;
mySubjectText= email.subject;
List<String> temp = mySubjectText.split(':');
String response = temp[0];
system.debug(response);
result.success = true;
return result; }
}
- manumolu
- February 03, 2011
- Like
- 0
- Continue reading or reply
Is it possible to use URLFOR function in visualforce email template?
Hi ,
I am trying to create a visualforce template on an Task to send email to Users when insertion of task happens (used a trigger).
Please find the code as of the visualforce template referred by the trigger as below :
<messaging:emailTemplate subject=" Task Created" recipientType="User" relatedToType="Task" >
<messaging:htmlEmailBody >
<html>
<body>
Task Status : {!relatedTo.Status}<br/>
Task Subject : {!relatedTo.Subject} <br/>
Task Type : {!relatedTo.Type} <br/>
Task Description : {!relatedTo.Description}<br/>
Polos Order : {!relatedTo.Order__c} <br/>
Task id : {!relatedTo.id}<br/>
<apex:outputLink value="/{!relatedToid}">
Please click on link to View task in salesforce!
</apex:outputLink>
</body>
</html>
</messaging:htmlEmailBody>
</messaging:emailTemplate>
Please Note,I have to put a link(URL) of the Task. In the email to be sent so that the user receiveing it can click on the link and open up the task view.
There are two issues that I am facing :
1) All the task (relatedTo) merge fields are coming balnk in the email sent to users.
2) I want to use URLFOR function with the email template for outputlink but this seems to be thoring an exception : invalid paramater for URLFOR
<apex:outputLink value="{!urlFor($Action.Task.View, relatedTo.id)}">
PS :
1) I cannot seem to use the visualforce component for the same becoz I am not getting relatedTo.Id to pass to VF component.
2)Oddly this is happening only when actual trigger is fired and not when I click on send test and verify merge fields.
Could some body please help me with this issue.
Thanks in advance for help!!!
- manumolu
- June 06, 2013
- Like
- 0
- Continue reading or reply