You need to sign in to do that
Don't have an account?
ashish jadhav 9
how many element list can hold?
how can I assign set & list values to map? and map values to set and list?
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
A list can hold 1000 elements(as per the limit).
set<String> email= [select email from Lead];
List<Lead> leads= [select name from Lead];
and you can assign them in a map like this:
map<email, leads> newmap=new map<email, leads>();
All Answers
A list can hold 1000 elements(as per the limit).
set<String> email= [select email from Lead];
List<Lead> leads= [select name from Lead];
and you can assign them in a map like this:
map<email, leads> newmap=new map<email, leads>();
In Apex programming there is no such limit defined on storing the records in a list, instead there a limit on heap size which is 6MB (Synchronous), so if you will store large amount of data in collection(List Set Map), it will give heap size error, so use getHeapSize() to handle it dynamically.
In context of showing List data on VF page,
A list can hold 1000 elements, however if you use readOnly annotation on page than it can store records upto 2000.
Heap size limits:
Synchronous : 6MB
Asynchronous : 12 MB
Email services: 36 MB
Best Regards
Faiz Ahmed
Depends on what you want as a key and what you want as a value.
Let's assume you want the lead Email as a key and the the Lead object as the value.
This is what you should do: