• #36914
    Salesforce | Aman Aman #4
    Forcetalks

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

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

     

    #36915
    Salesforce | shariq shariq #1
    Forcetalks

    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).

    #37138
    Salesforce | Parul Parul #2
    Forcetalks

    Hi

    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>
    <apex:column headerValue=”Last Name”>
    <apex:inputField value=”{!c1.Last_Name__c}”/>
    </apex:column>
    <apex:column headerValue=”City”>
    <apex:inputField value=”{!c1.City__c}”/>
    </apex:column>
    <apex:facet name=”footer”>Showing Page # {!pageNumber} of {!totalPages}</apex:facet>
    </apex:PageBlockTable>
    </apex:outputPanel>
    </apex:pageblockSection>

     

    Thanks

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

Please to reply to this topic.

CONTACT US

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

Sending

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

or    

Forgot your details?