You need to sign in to do that
Don't have an account?
Debbie Chrysochou
Error: Invalid field AccountNumber for SObject Order
Dear all,
I am a newbie in SFC.
I am trying to create a vf page that will get me the orders with their products. I am trying to include the account name and account number since our customers do get a different account number.
<messaging:emailTemplate subject="Orders with Products" recipientType="Contact" relatedToType="Order">
<messaging:htmlEmailBody >
<body style="font-family: 'Sans Serif'">
<h2>
Order with Products</h2>
<hr style="border: solid thin #C017BE"/>
<br/>
<table sellpadding="5" style="border-collapse: collapse" width="100%">
<tr>
<td align="right"
style="border-right-style: solid; border-reight-width: thin; border-right-color:#C017BE;"
width="20%">
<i>Name</i>
</td>
<td width="80%">
<b>{!relatedTo.Name}</b>
</td>
</tr>
<tr>
<td align="right"
style="border-right-style: solid; border-reight-width: thin; border-right-color:#C017BE;"
width="20%">
<i>Account Number</i>
</td>
<td width="80%">
<b>{!relatedTo.AccountNumber}</b>
</td>
</tr>
<tr>
<td align="right"
style="border-right-style: solid; border-reight-width: thin; border-right-color:#C017BE;"
width="20%">
<i>Wedding Date</i>
</td>
<td width="80%">
<b>{!relatedTo.Wedding_Date__c}</b>
</td>
</tr>
<tr>
<td align="right"
style="border-right-style: solid; border-reight-width: thin; border-right-color:#C017BE;"
width="20%">
<i>Wedding Time</i>
</td>
<td width="80%">
<b>{!relatedTo.Wedding_Time__c}</b>
</td>
</tr>
<tr>
<td align="right"
style="border-right-style: solid; border-reight-width: thin; border-right-color:#C017BE;"
width="20%">
<i>Venue</i>
</td>
<td width="80%">
<b>{!relatedTo.Venue__c}</b>
The error that I get is the headline of this post.
I am guessing that I will get the same error for the custom fields that I have created because wedding date/time and venue have been created in the account fields area.
Any idea how to connect these all??
Please help me!!!
I am a newbie in SFC.
I am trying to create a vf page that will get me the orders with their products. I am trying to include the account name and account number since our customers do get a different account number.
<messaging:emailTemplate subject="Orders with Products" recipientType="Contact" relatedToType="Order">
<messaging:htmlEmailBody >
<body style="font-family: 'Sans Serif'">
<h2>
Order with Products</h2>
<hr style="border: solid thin #C017BE"/>
<br/>
<table sellpadding="5" style="border-collapse: collapse" width="100%">
<tr>
<td align="right"
style="border-right-style: solid; border-reight-width: thin; border-right-color:#C017BE;"
width="20%">
<i>Name</i>
</td>
<td width="80%">
<b>{!relatedTo.Name}</b>
</td>
</tr>
<tr>
<td align="right"
style="border-right-style: solid; border-reight-width: thin; border-right-color:#C017BE;"
width="20%">
<i>Account Number</i>
</td>
<td width="80%">
<b>{!relatedTo.AccountNumber}</b>
</td>
</tr>
<tr>
<td align="right"
style="border-right-style: solid; border-reight-width: thin; border-right-color:#C017BE;"
width="20%">
<i>Wedding Date</i>
</td>
<td width="80%">
<b>{!relatedTo.Wedding_Date__c}</b>
</td>
</tr>
<tr>
<td align="right"
style="border-right-style: solid; border-reight-width: thin; border-right-color:#C017BE;"
width="20%">
<i>Wedding Time</i>
</td>
<td width="80%">
<b>{!relatedTo.Wedding_Time__c}</b>
</td>
</tr>
<tr>
<td align="right"
style="border-right-style: solid; border-reight-width: thin; border-right-color:#C017BE;"
width="20%">
<i>Venue</i>
</td>
<td width="80%">
<b>{!relatedTo.Venue__c}</b>
The error that I get is the headline of this post.
I am guessing that I will get the same error for the custom fields that I have created because wedding date/time and venue have been created in the account fields area.
Any idea how to connect these all??
Please help me!!!
Use <b>{!relatedTo.Account.AccountNumber}</b>
instead of <b>{!relatedTo.AccountNumber}</b>