You need to sign in to do that
Don't have an account?
shachna
Can I Sort Records before rendering as a PDF?
We currently have an old VF page that runs a series 'render' loops to sort reocrds for a PDF. Is there a way to set up the VF page (or possibly use a controller) to sort the records the way I want before running the renderAs='PDF' command so that I'll only need a single loop?
There is an associated controller that looks like this:
public with sharing class DispAllRecs
{
public DispAllRecs(ApexPages.StandardSetController controller)
{
controller.setPageSize(1000);
}
public static testmethod void testm1()
{
test.startTest();
list cg=[select id from Clinical_Goals__c
limit 2000];
ApexPages.StandardSetController con=new
ApexPages.StandardSetController(cg);
DispAllRecs objDAR= new DispAllRecs(con);
test.stopTest();
}
}
Can you please send a sample (or link to a sample) of the code I would need to use?
[select id from Clinical_Goals__c order by Name ASC/DESC limit 2000];