• armsjmac
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
Hi - I have created a flow which is meant to loop through all child records and update a couple of fields. The flow is getting the records correctly, assigning the new field values but on the last record that is updated it isnt adding it to the collection to be updated. Super weird and Ive pasted some of the code below as well as relevant screenshots.
From what I can see in this example:
1. All 5 child records are obtained without a problem
2. The loop goes through each of the records
3. The final record gets new values assigned but it doesnt get included on the update records which happens after the last record (in this case this is the record ending with XUAQ)

any help greatly appreciated

Final part of the flow and the record in question
User-added image
User-added image

2nd image shows only 4 records getting updated
User-added image
 

Hi Guys - i have been search and trying things for the past 10 hours without getting any closer to success.

 

I am trying to setup a VF email template to send an email to contacts pulling in information from assets. I have based it on the example https://developer.salesforce.com/page/VisualForceEmailTemplates_sample

I keep getting an error message of Error: Invalid field Asset for SObject Asset 

I have tried replacing Asset in this line with Assets Assets__c, Asset__c, Asset__r & Assets__rwhich i assume relates to the code in line24
when i leave the original example code of cases in it seems to work just fine. Hoping someone can see a super obvious error

cheers
John

<messaging:emailTemplate subject="Your Annual Maintenance on Isograph Products" recipientType="Contact" relatedToType="Asset">
<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>Dear {!recipient.name},</p>
         <p>Below is a list of cases related to the account: {!relatedTo.name}.</p>
          <table border="0" >
            <tr >
               <th>Product Name</th>
               <th>Copies</th>
               <th>Maintenance Expiry</th>
               <th>Renewal Cost</th>
               <th>Discount</th>
               <th>Discounted Pricing</th>
            </tr>
<apex:repeat var="cx" value="{!relatedTo.Asset}">
              <tr>
               <td>{!cx.Asset.Product_Name__c}</td>
                <td>{!cx.Asset.Quantity}</td>

Hi - I have created a flow which is meant to loop through all child records and update a couple of fields. The flow is getting the records correctly, assigning the new field values but on the last record that is updated it isnt adding it to the collection to be updated. Super weird and Ive pasted some of the code below as well as relevant screenshots.
From what I can see in this example:
1. All 5 child records are obtained without a problem
2. The loop goes through each of the records
3. The final record gets new values assigned but it doesnt get included on the update records which happens after the last record (in this case this is the record ending with XUAQ)

any help greatly appreciated

Final part of the flow and the record in question
User-added image
User-added image

2nd image shows only 4 records getting updated
User-added image