You need to sign in to do that
Don't have an account?
Yoshinori Mori
List Type and Non-List Type
I simply don't understand the idea of the difference between List and Non-List type(simple Object(DB) type).
List<ABCobject__c> abc and ABCobject__c
Names are the same.
Both are to be used.
Please correct what I understand about the List and Non-List(object(DB) type)
1.List type is to store data with index.
2.List type is needed to do something if or while statement while storing all data into List type object?
Do something from the all data?
3. Non-List is simply needed to access single data from the Non-List object.
Thanks
Mori
A List is a collection of elements, while the non-list is a single instance of an sobject record.
When you store data in a list it not only has an index associated with it, but it is an ordered collection, which means that you get the elements out in the same order that you put them in. You can also put duplicate elements into a list.
You'd use a list when you have more than one item of data (e.g. all the contacts that are associated with an account). You'd use the non-list when you have a single item of data (e.g. the account).
There is also a special for loop syntax that allows you to iterate the contents of a list, but its really just a convenience shortcut, as you can iterate a list by incrementing an index.
All Answers
A List is a collection of elements, while the non-list is a single instance of an sobject record.
When you store data in a list it not only has an index associated with it, but it is an ordered collection, which means that you get the elements out in the same order that you put them in. You can also put duplicate elements into a list.
You'd use a list when you have more than one item of data (e.g. all the contacts that are associated with an account). You'd use the non-list when you have a single item of data (e.g. the account).
There is also a special for loop syntax that allows you to iterate the contents of a list, but its really just a convenience shortcut, as you can iterate a list by incrementing an index.
List is the updated version of Array.
Group of same type(ABCobject__c) can able to stored in a List. Better you google it to know more!!!!!!
Thank you bob_buzzard
I've got a clear image of the List and Non-List Type.
Mori