While doing pagination for task using standardsetcontroller it's throwing error List controllers are not supported for Task

What is the other way to show data on vfpage in pagination format for task record using standardsetcontroller?

public ApexPages.StandardSetController setContask {
        if(setContask == null){
           string queryString = 'SELECT Priority,Subject,Status,Type from Task WHERE Status != \'Completed\'';
            setContask = new ApexPages.StandardSetController(Database.getQueryLocator(queryString));
            noOfRecords = setCon.getResultSize();
        return setContask;

Public List<Task> getTask(){
   return (List<Task>) setContask.getRecords();  

     <apex:pageBlockTable value="{!Task}" var="t">
                <apex:column value="{!t.Priority}"/>
                <apex:column value="{!t.Subject}"/>
                <apex:column value="{!t.Status}"/>
                <apex:column value="{!t.Type }"/>
  • Sounds like you're going to have to roll your own...You can just implement the same methods as the StandardSetController and it should mostly be clear how to do so. – Adrian Larson Apr 18 '17 at 13:17

Probably check this link out from salesforce developer forum https://developer.salesforce.com/forums/?id=906F000000098QYIAY

  • Please cite the relevant content here if the link answers the question. – Adrian Larson Apr 18 '17 at 13:22
  • @redDevil provide llink have using offset and its limit is only 2000 record but i have 8000 records so my requirement is not fullfilling from this link – cloudZigZag Apr 18 '17 at 13:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.