0

I am trying to create an email where it will show the recipient a list of the "Review Accounts" associated with the "Review" object. Where "Review Accounts" is a Child object for "Reviews". Below is what I have but it keeps giving me the "Error: Invalid field LLC_BI__Review_Account__r for Object LLC_BI__Review__c"

<messageing:emailTemplate subject="testing email" recipientType="User" 
                          relatedToType="LLC__BI_Review__c">
  <messaging:htmlEmailBody>
    <apex:repeat var="ra" value="{!relatedTo.LLC_BI__Review_Account__r}">

    </apex:repeat>
  </messaging:htmlEmailBody>
</messaging:emailTemplate>
0

Because you are using a managed package here, it looks like your definition of the relationship name has the incorrect name space LLC_BI

You have:

value="{!relatedTo.LLC_BI__Review_Account__r}"

But the namespace looks like it is LLC based on the relatedToType

So you want:

value="{!relatedTo.LLC__BI_Review_Account__r}"

assuming that is the true relationship name; more likely, it is plural

value="{!relatedTo.LLC__BI_Review_Accounts__r}"

Check your configuration to get the correct relationship name

2
  • You were correct, it needed to be plural. I must have mistyped the namespace. – Heeb Feb 4 at 16:34
  • Thank you for the help! – Heeb Feb 4 at 16:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.