Thursday, May 12, 2022

How to Get Custom Label Using SOQL

Hello All

Today we are going to discuss How to Get Custom Label Using SOQL

Custom labels are custom text values that can be accessed from Apex classes, Visualforce pages, or Lightning components. The values can be translated into any language Salesforce supports.

the Custom Labels in org write the following SOQL Query.
Note: Use Tooling API to Query

1st way

Select Id, Name FROM CustomLabel WHERE Value = '<your Value>'


Check the screenshot for more information about the result.










2 nd way

Select Id,Name,Masterlabel,Value,IsProtected,Category,Language,ManageableState FROM ExternalString WHERE Name='TestLabel'

Output: