1

how to query salesforce Labels using SOQL OR SOSL in query editor.

2
  • 2
    Custom labels are not accessible via SOQL. You will need to use the Metadata API to complete the query you are looking for. – NITHESH K Jul 28 '17 at 6:45
  • 2
    My biggest question is why do you want to query them? What do you want to do with them once you've queried them? And where are you accessing them from (Apex or integration)? – pchittum Jul 28 '17 at 12:07
1

You cannot do a SOQL/SOSL query on them but you can access the Labels by using Label.LabelName.

1
  • 1
    That doesn't have anything to do with what is being asked here. – Adrian Larson Jul 28 '17 at 11:56
1

You can query the custom label using SOQL like in the Developer console: SELECT Id, Name from customlabel where name='LabelName'. Make sure you have checked 'Use Tooling API'

[enter image description here][1**]**

1
  • From API perspective , same above can be fetched with SOQL at endpoint like : https://<OrgUrl>/services/data/v48.0/tooling/query/?q=select%20Id%2C%20Name%20from%20Customlabel%0Awhere%20Name%20%3D%20%27LabelName%27 – Paras Patidar May 5 '20 at 11:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.