0

I need to find the categories in my labels. So,

Starting from SOQL to query Custom Labels in Salesforce

and the documentation https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_customlabels.htm#!

I torn on tooling, and try this query:

Select Id, Name, ManageableState, NamespacePrefix, value FROM CustomLabel where NamespacePrefix = null

It works, and i get the expected results, as we are already using lots of labels in visualforce. But now i need also the cateories, associated with those labels. So i try:

Select Id, Name, ManageableState, NamespacePrefix, value, categories FROM CustomLabel where NamespacePrefix = null

and i get:

No such column 'categories' on entity 'ExternalString'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

But it's right there in documentation!

1 Answer 1

0

You could make use of the ExternalString table which represents a custom label for a translatable UI component. Includes access to the associated label in the Metadata API. Available in API version 38.0 and later as per docs

select Id,
    Name,
    ManageableState,
    NamespacePrefix,
    Value,
    Category
from ExternalString
where NamespacePrefix = null
3
  • computer said no: sObject type 'ExternalString' is not supported. May 21, 2020 at 9:27
  • Are you using Tooling API?
    – TSmith
    May 21, 2020 at 10:51
  • Yes, checking that box enables the query: Thanks!. Is there a way to also get the translations? Jun 9, 2020 at 8:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .