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

Could not resolve field 'Website' from <apex:outputField> value binding '{!con.Website}' in page Abc
Hi All,
Need help on this
Getting Error: Could not resolve field 'Website' from <apex:outputField> value binding '{!con.Website}' in page Abc
1.Controller
2.Vf Page
Need help on this
Getting Error: Could not resolve field 'Website' from <apex:outputField> value binding '{!con.Website}' in page Abc
1.Controller
public class Abc { public Dist__c con{get;set;} public Abc(){ Id conId = apexpages.currentpage().getparameters().get('id'); con = [SELECT id,name, (select website,Rating,industry,SLA__c from Accounts__r)from Dist__c WHERE Id=: conId]; } }
2.Vf Page
<apex:page controller="Abc"> <apex:pageBlock> <apex:pageBlockSection columns="1"> <apex:outputField Value="{!con.Website}"/> <apex:outputField Value="{!con.Rating}"/> <apex:outputField Value="{!con.Industry}"/> <apex:outputField Value="{!con.SLA__c}"/> </apex:pageBlockSection> </apex:pageBlock> </apex:page>
I have understand the Issue.
Can you please try the below code it may use helps you. Please let me know if it helps you.
Thanks & Regards
Madhukar_Heptarc
Greetings to you!
- Use <apex:pageBlockTable> instead of <apex:pageBlockSection>
<apex:pageBlock title="Details">
<apex:pageBlockTable border="1" cellpadding="3" cellspacing="0" value="{! mytskLisst }" var="ct" width="100%" >
<apex:column value="{!con.Website}"/>
<apex:column value="{!con.Rating}"/>
<apex:column value="{!con.Industry}"/>
<apex:column value="{!con.SLA__c}"/>
</apex:pageBlockTable>
</apex:pageBlock>
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha.