You need to sign in to do that
Don't have an account?

load generic Sobject with only ID
Hi There,
I'm sure this must be simple, but I'm not finding an immediate solution anywhere.
I have a method with ID as input parameter but no idea what object the ID is for.
I want to work out what type of object is is before I decide what to do with it.
sObject generic = [select ID from [?] where id=:someid];
Sorry for the basic question.
TIA
Here's one option that might work for you, this is code that executes in a System Log window, but should be easy to convert to a class method.