function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Hello,
Can we add a total of nearly 5000 ids to a particular list of string type.If there is any method or soln please help me out.
Thanks
shaan
shaan,
You can have a list of lists. Here is a code snippet that is a list that contains five lists. Each of the five lists contains 1000 items:
List<List<Integer>> outsideList = new List<List<Integer>>(); for (integer i=1; i<=5; i++) { List<Integer> insideList = new List<Integer>(); for (integer s=1; s<=1000; s++) { insideList.add(s); } outsideList.add(insideList); }
Thanks for Your reply John,
I went through your code, In your code you are using list of lists with this we can add no: of lists to a particular list.
But my problem here is that i am using an api call which executes records upto a max limit of 5000 records .
The api call is
Integer segmentId = createImmediateSegment('U/N', 'P/W','Version', List<String> emails);
Here in the above call i can pass List<string> as parameter but not List<List<string>>.
The exception raised when List<List<string>> is passed.
shaan,
You can have a list of lists. Here is a code snippet that is a list that contains five lists. Each of the five lists contains 1000 items:
List<List<Integer>> outsideList = new List<List<Integer>>(); for (integer i=1; i<=5; i++) { List<Integer> insideList = new List<Integer>(); for (integer s=1; s<=1000; s++) { insideList.add(s); } outsideList.add(insideList); }
Thanks for Your reply John,
I went through your code, In your code you are using list of lists with this we can add no: of lists to a particular list.
But my problem here is that i am using an api call which executes records upto a max limit of 5000 records .
The api call is
Integer segmentId = createImmediateSegment('U/N', 'P/W','Version', List<String> emails);
Here in the above call i can pass List<string> as parameter but not List<List<string>>.
The exception raised when List<List<string>> is passed.