You need to sign in to do that
Don't have an account?
mikeegar
Message Edited by mikeegar on 03-12-2008 08:30 PM
Instantiating sObject Lists
Hi,
Is there anyway to instantiate sObject lists? i.e.
List <sobject> updates = new List <sobject>();
I can see lots of situations where it would be usefull to pass concrete sobjects cast as sObject typed arguments and work with them in lists / collections. Might bend the boundery between a strongly and weakly typed language but handy all the same.
Message Edited by mikeegar on 03-12-2008 08:30 PM
you could declare a class to hold one of each type you desire, then make a list of that
class s_object { Contact c; Account a; Case s; }
then you can build lists of s_object, and access the contents depending on which you have stored there.
Message Edited by Ron Hess on 03-12-2008 11:47 PM