No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
Newer Version Available
toLabel()
A client application can have results from a query returned that are translated into the user’s language, using toLabel():
1toLabel(object.field)Use toLabel() on regular, multi-select, division, or currency code picklist fields (any field that has picklist values returned by the relevant describe call), data category group and data category unique name fields or RecordType names. Any organization can use toLabel(). It is particularly useful for organizations that have the Translation Workbench enabled.
1SELECT Company, toLabel(Recordtype.Name) FROM LeadThis query returns lead records with the record type name translated into the language for the user who issued the query.
You can use toLabel() to filter records using a translated picklist value. For example:
1SELECT Company, toLabel(Status)
2FROM Lead
3WHERE toLabel(Status) = 'le Draft'Lead records are returned where the picklist value for Status is 'le Draft.' The comparison is made against the value for the user’s language. If no translation is available for the user’s language for the specified picklist, the comparison is made against the master values.