1

I need to dynamically fetch Custom Labels in Apex class, something like

Get All Labels where name like 'a%'

I see SOQL does not support querying Custom Labels and although I see Metadata API can be used to fetch values I have not been able to get hold of any method that helps do so. Is there a method like Metadata.Operations.retrieve that helps read Custom Metadata.

  • Can you describe the use case a little bit? What would you be doing with a list of custom labels that begin with the letter a? – Mark Pond Jul 3 '18 at 22:48
  • 2
    You can use the Apex Metadata API wrapper in github - github.com/financialforcedev/apex-mdapi – cropredy Jul 3 '18 at 23:20

Your Answer

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

Browse other questions tagged or ask your own question.