0 votes
1 view
in Salesforce by (11.9k points)

I'm trying to create a Visualforce page with a number of related lists. I'm trying to display the same related lists that I have on the standard layout page. OpenActivities, ActivityHistories, Attachments, and CaseSolutions all work fine.

However, when I try to add EmailMessages I get the following error.

Visualforce Error

'EmailMessages' is not a valid child relationship name for entity Case

I'm able to sort of work around it by getting the email messages using some soql, but I'd really like it to be just a plain related list.

Can anyone suggest what I might be doing wrong?

1 Answer

0 votes
by (31.6k points)

For now EmailMessages related list isn't sustained in <apex:relatedlist> Though, you don't certainly have to use SOQL to form an unfiltered list, you can point emphasizing element's value to draw data immediately from the relationship:

<apex:dataTable value="{!Case.EmailMessages}" var="email">

    <apex:column value="{!email.Subject}" />

    ...

</apex:dataTable>

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...