Is there a way to instantiate an SObject without a SOQL query?
This works :
Type t = Type.forName('Account' ); Account o = (Account) t.newInstance();
But this doesn't :
Type t = Type.forName('Sobject' ); Sobject o = (Sobject) t.newInstance();
SObject appears to be an abstract type / interface. Given that,
is there a way to instantiate an SObject with a 'concrete' Id without using the
GlobalDescribe / 3-letter prefix trick.
For example , consider a trigger on
FeedItem where the
ParentId is of unknown type.