Play Games

Search This Blog

Showing posts with label How to get objectName from record Id in apex salesforce. Show all posts
Showing posts with label How to get objectName from record Id in apex salesforce. Show all posts

Saturday, August 7, 2021

How to get objectName from record Id in apex salesforce - Salesforce Globe For You

 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: