I'm trying to traverse a relationship between the CaseComment object and the Case object to get the value of the Case's CaseNumber field.
<apex:outputText value="{!comment.ParentId.CaseNumber}" />
but I get the following error:
Error: Unknown property 'String.CaseNumber'
So, from this I see that Salesforce is treating ParentId
as a String rather than a reference to the Case object, as I was hoping.
I note also that the 18 character version of the ID is returned if that makes any difference.
I'd like to know:
- In what circumstances I can use a relationship such as this as a reference to another object, and in which circumstances it will merely be treated as a String?
Thanks a lot