Private
Readonly
connectionPrivate
labelsPrivate
Readonly
loggerPrivate
Readonly
nsRetrieves custom labels by their developer names.
This method first attempts to resolve the requested labels from the in-memory cache. Any labels not found in the cache are looked up using the lookupLabels method.
An array of label developer names/keys to retrieve
Optional
language: stringOptional language code to retrieve localized versions of the labels
A promise that resolves to an object mapping label keys to their resolved values. Each resolved value contains the developer name, the label text value, and the language code. If a specific language is requested and available, the returned label will use that localization.
Private
lookupPrivate
resolve
Manages and retrieves Salesforce custom labels with support for localization.
This class provides functionality to:
The class maintains an in-memory cache of previously retrieved labels to minimize API calls to Salesforce. When requested labels are not in the cache, it performs a tooling API query to retrieve them along with their localizations.
Example