Get Label For SObject API Name
I have an exhaustive list of custom objects whose API Names and labels does not match. I end up opening each object in order to determine if the label has matching API Name.I want to see the API Name displayed along with label on the result page of custom Objects. Is there a better way to get label for a custom object when its API Name is known?
You can get the label using the
DescribeSObjectResult describe = SObjectType.MyApiName__c; system.debug(describe.getLabel());
Another common syntax is:
DescribeSObjectResult describe = MyApiName__c.sObjectType.getDescribe();
You can also just one-line it:
I am looking to do it from the platform, not from the code. A soql query will also help.
When I log into my org I do a search for objects which has more than 500 objects. I know the API Name and want to navigate to that object but I end of opening each object to see if that is the object I am looking for or not.