You need to sign in to do that
Don't have an account?
bibbo84
Dynamic Cast of type of List
Hi,
i have to make an upsert of a list. But for me the type of list is kwown at runtime.
How i create a list or right type?-->is't not possible to make an upsert of a list of sObject.
List<SObject> listtoupsert=new List<SObject>(); String type='Lead'; //it's possible to make something like this? List<type> listtoupsert2=new List<type>();
I am not sure if this meets your purpose, but using the SObjectType and getGlobalDescribe, you can basically build the object at run time. Just use the same generic object List and identify the type for all the other operations/