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

Problem uisng apex:pageblock with custom objects
why does this work:
<apex:page standardController="Account" tabStyle="Account" sidebar="false"> <apex:form > <apex:pageBlock > <apex:pageMessages /> <apex:pageBlockButtons > <apex:commandButton value="Save" action="{!save}"/> <apex:commandButton value="Cancel" action="{!cancel}"/> </apex:pageBlockButtons> <apex:pageBlockTable value="{!Account.contacts}" var="c"> <apex:column value="{!c.firstname}"/> <apex:column value="{!c.lastname}"/> <apex:column headerValue="Email"> <apex:inputField value="{!c.Email}"/> </apex:column> </apex:pageBlockTable> </apex:pageBlock> </apex:form> </apex:page> and this does not: <apex:page standardController="Financial_Education_workshop__c" tabStyle="Financial_Education_workshop__c" sidebar="false"> <apex:form > <apex:pageBlock > <apex:pageMessages /> <apex:pageBlockButtons > <apex:commandButton value="Save" action="{!save}"/> <apex:commandButton value="Cancel" action="{!cancel}"/> </apex:pageBlockButtons> <apex:pageBlockTable value="{!Financial_Education_workshop__c.Workshop_Attendance__c}" var="w"> <apex:column value="{!w.Attendee}"/> <apex:column headerValue="Attendance"> <apex:inputField value="{!w.Attendance__c}"/> </apex:column> </apex:pageBlockTable> </apex:pageBlock> </apex:form> </apex:page> Where Financial_Education_Workshop__c is a custom object and Workshop_Attendance__c is the name of a child relationship on another custom object. The error I am getting when I try to save the code is that Workshop_Attendance is an invalid field on Sobject Financial_Education_workshop__c. I am trying figure out the correct synatx for referring to the relationship between the objects so that I can display a list of the child records related to the parent object for editing in a grid. thx, Annie
All Answers
apex:pageBlockTable value="{!Financial_Education_workshop__c.Workshop_Attendance__r}" var="w"> So now I know to use r instead of c for relationships and I am sure that will apply elsewhere. thank! Annie