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
ran67ran67 

Custom Pagination for Page block table

Hi

I am Retriving the Opportunitylineitem  and  am able to displaying in the Pageblocktable on the page of the curent Products

I have more than 500 records. i am not display on the Page.

i want to keep the Pagination can u please help me

Historicaloppl=[select id,unitprice,PricebookEntry.Product2Id,product__c,PricebookEntry.Product2.Name,Opportunity.Product__r.Id,Product__r.Name,
Opportunity.Product__r.name,Purchase__c, PricebookEntryId,ServiceDate,Quantity,Action__c,Vendor__r.Name ,Opportunity.Name,Opportunity.StageName
from OpportunityLineItem where opportunityid!=: OPP.id and product__c=:userinput.product__c order by unitprice ];

mast0rmast0r

Hey, try to read this one:

 

Salesforce pagination

calvin_nrcalvin_nr

You can use either the Salesforce standard controller or use the new OFFSET feature to implement pagination.

ran67ran67

When am using the Offset Feature for that Query am not able to keep the Sorting by the unitPrice.It is not working is another method there to do the Pagination.Actually when am using the standard Pagination i m not able to keep for the Opportunitylineitem..........

Can u Suggest me to do another way 

thanks n advances

calvin_nrcalvin_nr

Any code/examples?