function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rashitra DhanasekaranRashitra Dhanasekaran 

while trying to create table for custom fields in custom object getting following error Missing required attribute value in <apex:pageBlockTable>

Best Answer chosen by Rashitra Dhanasekaran
AvaneeshAvaneesh
Hii Rashitra 
Can i see your code but gernally this error show when you missed required attribute and in apex pageblocktable required attribute are VALUE and VAR use both required value 
<apex:pageBlockTable value="{!account.Contacts}" var="item">

            <apex:column value="{!item.name}"/>

        </apex:pageBlockTable>
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_pageBlockTable.htm?search_text=pageblocktable


if this would be helpful mark as best answer else let me know your problem

Thank you 
Avaneesh Singh

All Answers

AvaneeshAvaneesh
Hii Rashitra 
Can i see your code but gernally this error show when you missed required attribute and in apex pageblocktable required attribute are VALUE and VAR use both required value 
<apex:pageBlockTable value="{!account.Contacts}" var="item">

            <apex:column value="{!item.name}"/>

        </apex:pageBlockTable>
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_pageBlockTable.htm?search_text=pageblocktable


if this would be helpful mark as best answer else let me know your problem

Thank you 
Avaneesh Singh
This was selected as the best answer
Rashitra DhanasekaranRashitra Dhanasekaran
Hi Avaneesh
Here is my code where i am trying to use pageBlockTable with my custom objects Timesheet_Management__c and  Timesheetvalues. Will it work with custom objects,if so what is the syntax i have to use?
<apex:page standardController="Timesheet_Management__c">
<apex:form >
<apex:PageBlock title="Search Timesheets" >
<apex:pageBlockSection >
<apex:inputField value="{!Timesheet_Management__c.Start_Date__c}"/>
<apex:inputField value="{!Timesheet_Management__c.End_Date__c}"/>
<!--<apex:commandButton  value="Search" action="{!result}"/>-->
</apex:pageBlockSection>
</apex:PageBlock>
</apex:form>
<apex:form >
<apex:pageBlock title="All Timesheets">
<apex:pageBlockTable> value = "{!Timesheet_Management__r.Timesheetvalues}" var = "Time">

</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
 </apex:page>
Hardik BambHardik Bamb
Hi Rahitra,

I'm also working on TimeSheet Management and I'm new to Salesforce. Can you please guide me to achieve this.