You need to sign in to do that
Don't have an account?

Error: Invalid field QuoteLineItem for SObject Opportunity
Hi Team,
I want to show Quote No(Formula field) and No of Ticket in Email Template i create the Visula force template and i got the following error.
"Error: Invalid field QuoteLineItem for SObject Opportunity". I am create the below code for youe reference.
<messaging:emailTemplate subject="Payment information is confirmed By Finance Team" recipientType="User" relatedToType="Opportunity">
<messaging:htmlEmailBody >
<html>
<head>
<style>
table, th, tr {
border: 3px solid red;
border-collapse: collapse;
}
</style>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" yahoo="fix" style="font-family:Arial, sans-serif; background:#efefef;">
<table height="100px" width="600px" cellpadding="0" cellspacing="0" border="0" align="center" style="background-color:#efefef;">
<tr height="100px" >
<td>
<img src="https://c.cs5.content.force.com/servlet/servlet.ImageServer?id=015O0000000Mb2R&oid=00DO00000051Sb5&lastMod=1427087493000" alt="" width="175" height="50" style="padding:15px; display:block; background-color:#efefef; color:#ffffff;" border="0"/>
</td>
</tr>
<tr height="60px" >
<td style="width:560px; padding:15px 10px; font-size:13px; font-family:arial,sans-serif; line-height:18px; text-align:justify; vertical-align:top; background-color:#ffffff; color:#010101;">
Hi {!recipient.name},<br/><br/>
<apex:repeat var="qx" value="{!relatedTo.QuoteLineItem}">
We have received the payment of {!relatedTo.Amount_Received__c} of {!qx.No_Of_Tickets__c}tickets of{!relatedTo.Name} for {!qx.Quote_No__c}. <br/><br/>
Please follow the link to view https://ap2.salesforce.com/{!relatedTo.Id}<br/><br/>
</apex:repeat>
Thank You,<br/>
BookMyShow Finance Team
</td>
</tr>
<tr height="40px" >
<td>
<table width="600px">
<tr>
<td style="vertical-align:top; text-align:left;"><a href="http://www.facebook.com/pages/BookMyShow/82235273865" target="_blank"><img src="https://c.cs5.content.force.com/servlet/servlet.ImageServer?id=015O0000000Mb2W&oid=00DO00000051Sb5&lastMod=1427087527000" alt="Facebook Share" width="30" height="30" border="0" /></a></td>
<td style="vertical-align:top; text-align:left;"><a href="http://www.twitter.com/BookMyShow"><img src="https://c.cs5.content.force.com/servlet/servlet.ImageServer?id=015O0000000Mb30&oid=00DO00000051Sb5&lastMod=1427087711000" alt="Twitter" width="30" height="30" border="0" /></a></td>
<td style="vertical-align:top; text-align:left;"><a href="http://www.youtube.com/user/bookmyshow" target="_blank"><img src="https://c.cs5.content.force.com/servlet/servlet.ImageServer?id=015O0000000Mb35&oid=00DO00000051Sb5&lastMod=1427087742000" alt="Youtube" width="30" height="30" border="0" /></a></td>
<td style="vertical-align:top; text-align:left;"><a href="https://plus.google.com/110517543803442814698/posts" target="_blank"><img src="https://c.cs5.content.force.com/servlet/servlet.ImageServer?id=015O0000000Mb2g&oid=00DO00000051Sb5&lastMod=1427087583000" alt="Google" width="30" height="30" border="0" /></a></td>
<td style="vertical-align:top; text-align:left;"><a href="http://www.linkedin.com/company/bookmyshow/" target="_blank"><img src="https://c.cs5.content.force.com/servlet/servlet.ImageServer?id=015O0000000Mb2v&oid=00DO00000051Sb5&lastMod=1427087685000" alt="Linkedin" width="30" height="30" border="0" /></a></td>
<td style="vertical-align:top; text-align:left;"><a href="http://line.naver.jp/ti/p/%40bookmyshow" target="_blank"><img src="https://c.cs5.content.force.com/servlet/servlet.ImageServer?id=015O0000000Mb2q&oid=00DO00000051Sb5&lastMod=1427087656000" alt="Linkedin" width="30" height="30" border="0" /></a></td>
<td style="vertical-align:top; text-align:center;"><a href="http://instagram.com/bmsbookmyshow" target="_blank"><img src="https://c.cs5.content.force.com/servlet/servlet.ImageServer?id=015O0000000Mb2l&oid=00DO00000051Sb5&lastMod=1427087617000" alt="Instagram" width="30" height="30" border="0" /></a></td>
<td style="width:25px;"><img src="http://cnt.in.bookmyshow.com/mailers/images/footer110814/call.png" alt="Call BookMyShow Contact Center" width="30" height="30" border="0" style="vertical-align:middle;" /></td>
<td style="width:125px; padding:0 0 0 10px; font-family:Arial,Helvetica,sans-serif; font-size:16px; font-weight:bold; color:#010101; vertical-align:middle;">+912239895050</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
</messaging:htmlEmailBody>
</messaging:emailTemplate>
I dont know how to show the both formula field in template.
Regards,
Uma
I want to show Quote No(Formula field) and No of Ticket in Email Template i create the Visula force template and i got the following error.
"Error: Invalid field QuoteLineItem for SObject Opportunity". I am create the below code for youe reference.
<messaging:emailTemplate subject="Payment information is confirmed By Finance Team" recipientType="User" relatedToType="Opportunity">
<messaging:htmlEmailBody >
<html>
<head>
<style>
table, th, tr {
border: 3px solid red;
border-collapse: collapse;
}
</style>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" yahoo="fix" style="font-family:Arial, sans-serif; background:#efefef;">
<table height="100px" width="600px" cellpadding="0" cellspacing="0" border="0" align="center" style="background-color:#efefef;">
<tr height="100px" >
<td>
<img src="https://c.cs5.content.force.com/servlet/servlet.ImageServer?id=015O0000000Mb2R&oid=00DO00000051Sb5&lastMod=1427087493000" alt="" width="175" height="50" style="padding:15px; display:block; background-color:#efefef; color:#ffffff;" border="0"/>
</td>
</tr>
<tr height="60px" >
<td style="width:560px; padding:15px 10px; font-size:13px; font-family:arial,sans-serif; line-height:18px; text-align:justify; vertical-align:top; background-color:#ffffff; color:#010101;">
Hi {!recipient.name},<br/><br/>
<apex:repeat var="qx" value="{!relatedTo.QuoteLineItem}">
We have received the payment of {!relatedTo.Amount_Received__c} of {!qx.No_Of_Tickets__c}tickets of{!relatedTo.Name} for {!qx.Quote_No__c}. <br/><br/>
Please follow the link to view https://ap2.salesforce.com/{!relatedTo.Id}<br/><br/>
</apex:repeat>
Thank You,<br/>
BookMyShow Finance Team
</td>
</tr>
<tr height="40px" >
<td>
<table width="600px">
<tr>
<td style="vertical-align:top; text-align:left;"><a href="http://www.facebook.com/pages/BookMyShow/82235273865" target="_blank"><img src="https://c.cs5.content.force.com/servlet/servlet.ImageServer?id=015O0000000Mb2W&oid=00DO00000051Sb5&lastMod=1427087527000" alt="Facebook Share" width="30" height="30" border="0" /></a></td>
<td style="vertical-align:top; text-align:left;"><a href="http://www.twitter.com/BookMyShow"><img src="https://c.cs5.content.force.com/servlet/servlet.ImageServer?id=015O0000000Mb30&oid=00DO00000051Sb5&lastMod=1427087711000" alt="Twitter" width="30" height="30" border="0" /></a></td>
<td style="vertical-align:top; text-align:left;"><a href="http://www.youtube.com/user/bookmyshow" target="_blank"><img src="https://c.cs5.content.force.com/servlet/servlet.ImageServer?id=015O0000000Mb35&oid=00DO00000051Sb5&lastMod=1427087742000" alt="Youtube" width="30" height="30" border="0" /></a></td>
<td style="vertical-align:top; text-align:left;"><a href="https://plus.google.com/110517543803442814698/posts" target="_blank"><img src="https://c.cs5.content.force.com/servlet/servlet.ImageServer?id=015O0000000Mb2g&oid=00DO00000051Sb5&lastMod=1427087583000" alt="Google" width="30" height="30" border="0" /></a></td>
<td style="vertical-align:top; text-align:left;"><a href="http://www.linkedin.com/company/bookmyshow/" target="_blank"><img src="https://c.cs5.content.force.com/servlet/servlet.ImageServer?id=015O0000000Mb2v&oid=00DO00000051Sb5&lastMod=1427087685000" alt="Linkedin" width="30" height="30" border="0" /></a></td>
<td style="vertical-align:top; text-align:left;"><a href="http://line.naver.jp/ti/p/%40bookmyshow" target="_blank"><img src="https://c.cs5.content.force.com/servlet/servlet.ImageServer?id=015O0000000Mb2q&oid=00DO00000051Sb5&lastMod=1427087656000" alt="Linkedin" width="30" height="30" border="0" /></a></td>
<td style="vertical-align:top; text-align:center;"><a href="http://instagram.com/bmsbookmyshow" target="_blank"><img src="https://c.cs5.content.force.com/servlet/servlet.ImageServer?id=015O0000000Mb2l&oid=00DO00000051Sb5&lastMod=1427087617000" alt="Instagram" width="30" height="30" border="0" /></a></td>
<td style="width:25px;"><img src="http://cnt.in.bookmyshow.com/mailers/images/footer110814/call.png" alt="Call BookMyShow Contact Center" width="30" height="30" border="0" style="vertical-align:middle;" /></td>
<td style="width:125px; padding:0 0 0 10px; font-family:Arial,Helvetica,sans-serif; font-size:16px; font-weight:bold; color:#010101; vertical-align:middle;">+912239895050</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
</messaging:htmlEmailBody>
</messaging:emailTemplate>
I dont know how to show the both formula field in template.
Regards,
Uma