Get Object and Field Label value using API Names

134 Views

This is a very common use case where you have the API Name, but you need the Current Labels for your object, or field. Either its Custom or Standard.

Typically, you know it already, but you need it when you’re writing your apex dynamically.

Here is a simple method which accept API Names in STRING and returns the labels. You can modify as per your need:

Happy Coding!

Leave a Comment