0

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 {
    get{
        if(setContask == null){
           string queryString = 'SELECT Priority,Subject,Status,Type from Task WHERE Status != \'Completed\'';
            setContask = new ApexPages.StandardSetController(Database.getQueryLocator(queryString));
            setContask.setPageSize(size);
            noOfRecords = setCon.getResultSize();
        }
        return setContask;
    }set;
}

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 }"/>
            </apex:pageBlockTable>
1
  • 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
    Commented Apr 18, 2017 at 13:17

1 Answer 1

-1

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

2
  • Please cite the relevant content here if the link answers the question.
    – Adrian Larson
    Commented Apr 18, 2017 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 Commented Apr 18, 2017 at 13:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .