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
I Have a big confussion in using lists and set in triggers can any one guide me when to use list and sets in trigger
Difference between list and set is that set holds only unique values while list can have duplicates.
If you are stroing id then use sets
Lists genrally hold records,
for example a query will return you list of records,
List<account> accList = [select id ,name from account limit 12];
It depends how you use it in trigger,
may be you can store your record id's in set(while you iterate over trigger.nw) and then use the set to query, implemt your logic.
thanks,
Difference between list and set is that set holds only unique values while list can have duplicates.
If you are stroing id then use sets
Lists genrally hold records,
for example a query will return you list of records,
List<account> accList = [select id ,name from account limit 12];
It depends how you use it in trigger,
may be you can store your record id's in set(while you iterate over trigger.nw) and then use the set to query, implemt your logic.
thanks,
Have a look, You will able to figure out the differences, why to use and when to use