• #36914
    Salesforce | Aman Aman #4

    How to implement the pagination in Salesforce Object Query Language (SOQL)?

    How to implement the pagination in Salesforce Object Query Language (SOQL)?


    Salesforce | shariq shariq #1

    In spring 12, Salesforce has come up with ability of SOQL to get records from position “X” instead of position “1” every time to help creating pagination feature.

    Select Id, Name from Lead LIMIT 5 OFFSET 2
    Above query will return 5 Lead records starting from record number 10 (5×2).

    Salesforce | Parul Parul #2


    Yes you can implement pagination in Visualforce as follows:

    <apex:pageblockSection >
    <apex:outputPanel id=”myPanel”>
    <apex:PageBlockTable var=”c1″ value=”{!cnd}”>
    <apex:column headerValue=”First Name”>
    <apex:inputField value=”{!c1.First_Name__c}”/>
    <apex:column headerValue=”Last Name”>
    <apex:inputField value=”{!c1.Last_Name__c}”/>
    <apex:column headerValue=”City”>
    <apex:inputField value=”{!c1.City__c}”/>
    <apex:facet name=”footer”>Showing Page # {!pageNumber} of {!totalPages}</apex:facet>



Viewing 3 posts - 1 through 3 (of 3 total)

Please to reply to this topic.


We're not around right now. But you can send us an email and we'll get back to you, asap.


About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2019 Forcetalks. All Right Reserved.

Log in with your credentials


Forgot your details?