You need to sign in to do that
Don't have an account?
RV328
Please help - Error: Unknown property 'String.Name'
Here is the code:
<apex:page standardController="Account">
<apex:pageBlock title="{! $User.FirstName} {! $User.LastName}">
You are viewinf account of {! account.name}
</apex:pageBlock>
<apex:pageBlock title="Contacts">
<apex:form>
<apex:dataTable value=" {! account.Contacts}" var="AC" cellpadding="4" border="1">
<apex:column>
<apex:facet name="header"> Name </apex:facet>
<apex:commandLink reRender="detail">
{! AC.Name}
<apex:param name="cid" value="{! AC.id}"/>
</apex:commandLink>
</apex:column>
<apex:column>
<apex:facet name="header"> Phone </apex:facet>
{! AC.Phone}
</apex:column>
</apex:dataTable>
</apex:form>
</apex:pageBlock>
<apex:outputPanel id="detail">
<apex:detail subject="{! $CurrentPage.parameters.cid}" inlineEdit="false" relatedList="false" title="false"/>
</apex:outputPanel>
</apex:page>
<apex:page standardController="Account">
<apex:pageBlock title="{! $User.FirstName} {! $User.LastName}">
You are viewinf account of {! account.name}
</apex:pageBlock>
<apex:pageBlock title="Contacts">
<apex:form>
<apex:dataTable value=" {! account.Contacts}" var="AC" cellpadding="4" border="1">
<apex:column>
<apex:facet name="header"> Name </apex:facet>
<apex:commandLink reRender="detail">
{! AC.Name}
<apex:param name="cid" value="{! AC.id}"/>
</apex:commandLink>
</apex:column>
<apex:column>
<apex:facet name="header"> Phone </apex:facet>
{! AC.Phone}
</apex:column>
</apex:dataTable>
</apex:form>
</apex:pageBlock>
<apex:outputPanel id="detail">
<apex:detail subject="{! $CurrentPage.parameters.cid}" inlineEdit="false" relatedList="false" title="false"/>
</apex:outputPanel>
</apex:page>
Your whitespace is creating problem.
Plaese notice whitespace before {!account.Contacts}
Thanks,
Himanshu
Salesforce Certified Developer | Administrator | Service Cloud Consultant
P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
All Answers
Your whitespace is creating problem.
Plaese notice whitespace before {!account.Contacts}
Thanks,
Himanshu
Salesforce Certified Developer | Administrator | Service Cloud Consultant
P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
Can you do one thing ,just change the dataTable to pageblock table and save ,then edit and change to dataTable .
Any issue let me know.