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
abhishekshuklacs001abhishekshuklacs001 

StandardSetController

Hi, I
Iam trying to apply standardSetController with MAP<string,String>.Getting following error


 Error: Constructor not defined: [ApexPages.StandardSetController].<Constructor>(MAP<String,String>)

Please assist me if we can use standardSetController with MAP<STRING,STRING> or LIST<STRING>

 


map<String,string> tempMap = New map<String,string>();
if (sscQueueMember==null){
size = 1;
sscQueueMember=new ApexPages.StandardSetController(tempMap);
noOfRecords=sscQueueMember.getResultSize();
sscQueueMember.setPageSize(size);
}
//userList=(list<user>)sscQueueMember.getRecords();
tempMap=(map<string,string>)sscQueueMember.getRecords();
return tempMap

ryanjuptonryanjupton

You have to instatiate it with a List or Database.getQueryLocator. See here for more: http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#CSHID=apex_dynamic.htm|StartTopic=Content%2Fapex_dynamic.htm|SkinName=webhelp

abhishekshuklacs001abhishekshuklacs001

Hi,
Thanks for your reply,
I am a new bee in Salesforce, 
Will you please elaborate, how i ll be able to instantiate it and resolve .

as i tried to instantiate it but same error was appearing .