Play Games

Search This Blog

Friday, October 9, 2015

How to get Object name based on ID in salesforce


id m='006Z000000El76yIAB';
String sObjName = m.getSObjectType().getDescribe().getName();
system.debug('Object Name :'+sObjName );

output: Object Name :Opportunity