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

Unknown property 'UserStandardController.recipient'
I'm making a Visualforce email template, and I would like to pass the recipient (a User) to a custom component. Basically, I have the following setup (leaving out some unrelevant content).
Template:
Custom component:
I saved the component successfully, but when saving the template, I get the following error: Unknown property 'UserStandardController.recipient'.
Any ideas what might be causing this?
Template:
<messaging:emailTemplate subject="..." recipientType="User" relatedToType="Some_Custom_Object__c"> <messaging:htmlEmailBody > <c:Email recipient="{!recipient}"> <p>Some content...</p> </c:Email> </messaging:htmlEmailBody> </messaging:emailTemplate>
Custom component:
<apex:component access="global"> <apex:attribute type="User" name="recipient" description="The user recieving this email" access="global" /> <html> <head> <c:email_styles /> </head> <body> <p>Dear {!recipient.Name},</p> <apex:componentBody /> </body> </html> </apex:component>
I saved the component successfully, but when saving the template, I get the following error: Unknown property 'UserStandardController.recipient'.
Any ideas what might be causing this?


Naming the attribute in the component differently made the error go away:
Works like a charm! Weird bug, though.