function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Support 3743Support 3743 

Inserting query in a Visualforce email template

I want to display all the account-related partners in a Visualforce email template:

relatedToType="Account"
<apex:repeat var="op" value=?>
...
I want value to be a list of all the partners related to the current account. I tried inserting a query: value="{!SELECT Name FROM Account WHERE Id IN (SELECT AccountToId FROM Partner WHERE AccountFromId = relatedTo.Id)}"

The code fails. Can someone help me with this?