August 20, 2021

How to get label/name of the object using API Name in Salesforce?

Sample code:
DescribeSObjectResult objDescribe = SObjectType.Employee__c;
system.debug( 'Label is ' + objDescribe.getLabel() );

Output:
 

No comments:

Post a Comment