function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dipu2dipu2 

How can I find the SObject name from a given ID

In my Apex code I want to log about the ID with no finformation about the corresponding SObject. How can I find what is the SObject for a given external Id?

Best Answer chosen by Admin (Salesforce Developers) 
manuel-jose-condemanuel-jose-conde

hi,

 

we  have now (really fresh)  in winter13:

ID.getSObjectType Method

 

 

Follow this link to get more details:

http://www.forcelabs.net/2012/08/best-features-of-salesforcecom-winter.html

 

 

Regards

Manuel