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
Devendra@SFDCDevendra@SFDC 

maximum number of <apex:enhancedlist> components on a page is 5 salesforce

Hello Board,

 

We have created a VF page and used this VF page for Visualforce Tab (Admin),

 

This VF page consist of <apex:enhancedList> component.

 

<apex:page>
<apex:tabPanel>
<apex:tab label="{!$ObjectType.Holiday__c.label}s" name="Holidays" id="holidays" styleClass="labelCol" rendered="{!$ObjectType.Holiday__c.accessible}">
<apex:enhancedList type="Holiday__c" height="300" rowsPerPage="50" id="Holidaylist" customizable="false"/>
</apex:tab>

<!--
Similarly there are multiple such tabs to display records of various objects..
-->
</apex:tabPanel>
</apex:page>

 

This page works properly. But sometimes it gives an error "maximum number of <apex:enhancedlist> components on a page is 5 salesforce".

 

The day after this issue, once again it starts working properly, without any code change.

 

Why sometime this issue occurs and automatically correct this issue?

 

What needs to be done to correct this issue?

 

Thanks,
Devendra

Navatar_DbSupNavatar_DbSup

Hi,

Try the below code snippet as reference:

 

<apex:page>

<apex:tabPanel>

<apex:tab label="{!$ObjectType.Holiday__c.label}s" name="Holidays" id="holidays" styleClass="labelCol" rendered="{!$ObjectType.Holiday__c.accessible}">

<apex:outputPanel layout="block">

<apex:enhancedList type="Holiday__c" height="300" rowsPerPage="50" id="Holidaylist" customizable="false"/>

</apex:outputPanel>

</apex:tab>

<!--

Similarly there are multiple such tabs to display records of various objects..

-->

</apex:tabPanel>

</apex:page>

 

 

Note: You can only have five <apex:enhancedList> components on a single page

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

Devendra@SFDCDevendra@SFDC

 

Thanks Ankit for your response.

 

Note: You can only have five <apex:enhancedList> components on a single page

 

According above note, If we can have only 5 enhanced list component on single page then It should not be working earlier too.

 

Thought we have more than 5 enhances list components in single page in our developer org, it is working properly. One of our app subscriber faced this issue on friday. But when I logged into their org today, it was working properly.

 

I can understand, the error has occurred due to the limit on <apex:enhancedList> components. But somehow this error does not occur every time.

 

Anyone faced such issue?

 

Thanks,

Devendra

SisoSiso
Yes, we are also facing same problem.