• Chris Traver
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
I can follow the directions on cases and this works but when I apply the code below to my custom object I get errors or can only get one line to appear.   The below code products the error Error: Unknown property 'String.QTY__c'.     If I take Cx out of the below it only shows one record.

<messaging:emailTemplate recipientType="Contact"
    relatedToType="Ordered__c"
    subject="Your Order Has Shipped PO # {!RelatedTo.Name}"
   
    replyTo="info@info.com">

    <messaging:htmlEmailBody >
        <html>
            <body>
            <STYLE type="text/css">
        TH {font-size: 11px; font-face: arial;background: #CCCCCC; border-width: 1;  text-align: center }
        TD  {font-size: 11px; font-face: verdana }
        TABLE {border: solid #CCCCCC; border-width: 1}
        TR {border: solid #CCCCCC; border-width: 1}
     </STYLE>
     <font face="arial" size="2">
     
            
     
            <p> Your order or a portion of your order has shipped.  </p>
            
            <p> Purchase Order #: {!relatedTo.Name}</p>
            
      

            <table>
            <tr>
            <th>Action</th>
            <th>QTY</th>
            <th>Part</th>
            <th>Description</th>
            <th>Tracking</th>
            <th>Freight Co</th>
            </tr>
            
            <apex:repeat var="cx" value="{!relatedTo.Name}">
            

            
            <tr>
            <td><a href="https://na1.salesforce.com/{!relatedto.id}">View</a> |
        <a href="https://na1.salesforce.com/{!relatedto.id}/e">Edit</a></td>
            
            
            <td>{!cx.QTY__c}</td>
            <td>{!cx.Part__c}</td>
            <td>{!cx.Description2__c}</td>            
            <td>{!cx.Tracking_Number__c}</td>
            <td>{!cx.Freight_CO__c}</td>
            
            
            </tr>
            </apex:repeat>
            </table>
            
           
            <p> For more information, login to http://www.salesforce.com</p>
Help with Apex Repeat for Custom Orders Object
Hello,

New to Visualforce and creating an email template for orders that have shipped. I'm unable to get the line to repeat if there are multiple items on the same PO #.

Can someone tell me what I'm doing wrong, I keep trying different things and have not been successful.

<messaging:emailTemplate recipientType="Contact"
    relatedToType="Ordered__c"
    subject="Your Order Has Shipped PO # {!RelatedTo.Name}"
    
   
    replyTo="example@example.com">

    <messaging:htmlEmailBody >
        <html>
            <body>
            <STYLE type="text/css">
        TH {font-size: 11px; font-face: arial;background: #CCCCCC; border-width: 1;  text-align: center }
        TD  {font-size: 11px; font-face: verdana }
        TABLE {border: solid #CCCCCC; border-width: 1}
        TR {border: solid #CCCCCC; border-width: 1}
     </STYLE>
     <font face="arial" size="2">
     
            
     
            <p> Your order or a portion of your order has shipped.  Below shows tracking for each ordered line item</p>
            
            <p> Order #: {!relatedTo.Name}</p>
            
      

            <table>
            <tr>
            <th>Action</th>
            <th>QTY</th>
            <th>Part</th>
            <th>Description</th>
            <th>Tracking</th>
            <th>Freight Co</th>
            </tr>
            
            <apex:repeat var="cx" value="{!relatedTo.id}">
            

            
            <tr>
            <td><a href="https://na1.salesforce.com/{!relatedto.id}">View</a> |
        <a href="https://na1.salesforce.com/{!relatedto.id}/e">Edit</a></td>
            
            
            <td>{!cx.QTY__c}</td>
            <td>{!cx.Part__c}</td>
            <td>{!cx.Description2__c}</td>            
            <td>{!cx.Tracking_Number__c}</td>
            <td>{!cx.Freight_CO__c}</td>
            
            
            </tr>
            </apex:repeat>
            </table>
            
           
            <p> For more information, login to http://www.salesforce.com</p>
            

             
               </font>
            </body>
        </html>
    </messaging:htmlEmailBody>
</messaging:emailTemplate>

 
Help with Apex Repeat for Custom Orders Object
Hello,

New to Visualforce and creating an email template for orders that have shipped. I'm unable to get the line to repeat if there are multiple items on the same PO #.

Can someone tell me what I'm doing wrong, I keep trying different things and have not been successful.

<messaging:emailTemplate recipientType="Contact"
    relatedToType="Ordered__c"
    subject="Your Order Has Shipped PO # {!RelatedTo.Name}"
    
   
    replyTo="example@example.com">

    <messaging:htmlEmailBody >
        <html>
            <body>
            <STYLE type="text/css">
        TH {font-size: 11px; font-face: arial;background: #CCCCCC; border-width: 1;  text-align: center }
        TD  {font-size: 11px; font-face: verdana }
        TABLE {border: solid #CCCCCC; border-width: 1}
        TR {border: solid #CCCCCC; border-width: 1}
     </STYLE>
     <font face="arial" size="2">
     
            
     
            <p> Your order or a portion of your order has shipped.  Below shows tracking for each ordered line item</p>
            
            <p> Order #: {!relatedTo.Name}</p>
            
      

            <table>
            <tr>
            <th>Action</th>
            <th>QTY</th>
            <th>Part</th>
            <th>Description</th>
            <th>Tracking</th>
            <th>Freight Co</th>
            </tr>
            
            <apex:repeat var="cx" value="{!relatedTo.id}">
            

            
            <tr>
            <td><a href="https://na1.salesforce.com/{!relatedto.id}">View</a> |
        <a href="https://na1.salesforce.com/{!relatedto.id}/e">Edit</a></td>
            
            
            <td>{!cx.QTY__c}</td>
            <td>{!cx.Part__c}</td>
            <td>{!cx.Description2__c}</td>            
            <td>{!cx.Tracking_Number__c}</td>
            <td>{!cx.Freight_CO__c}</td>
            
            
            </tr>
            </apex:repeat>
            </table>
            
           
            <p> For more information, login to http://www.salesforce.com</p>
            

             
               </font>
            </body>
        </html>
    </messaging:htmlEmailBody>
</messaging:emailTemplate>