How to get objectName from record Id in apex salesforce - Salesforce Globe For You
Solution:
Id recordId = '00Q0o00001fxEZiEAM';
Schema.SObjectType sobjectType = recordId.getSObjectType();
String sobjectName = sobjectType.getDescribe().getName();
system.debug('Object Name : '+sobjectName);
Output:
No comments:
Post a Comment