1

While reading documentation for the lightning:input aura component, I noticed that some attributes default to $Label.LightningControl.activeCapitalized or $Label.LightningControl.inactiveCapitalized.

So what are this LightningControl lables? Can I use them in my code, or should I? If yes, where can I this list of LightningControl labels in the system?

2

This is interesting, Normal syntax of the accesing custom label is $Label.Namespace.LabelName' . So this impliesLightningControl` is an internal namespace used by the lightning team to default a few values here and there.

This namespace reminds me of this error which I faced, a few years back. $Label.LightningControl.required does not exist

A custom label should be universally available, I tried accessing it in apex: System.debug(System.label.LightningControl.activeCapitalized); which gave me compile time error.

and in VF as {!$Label.LightningControl.activeCapitalized} which again gave me compile time error.

Also what other possible values can there be for this LightningControl namespace, I tried running this query in Developer Console using tooling Api.

SELECT ID , Name , Value , namespaceprefix FROM CUSTOMLABEL where namespaceprefix = 'LightningControl'

This returned zero results, which implies salesforce doesn't want us to use labels in this namespace outside lightning aura components.

Can I use them in my code? I can confirm you can use them in Lightning Aura components, but not in VF and apex

Should I use them? I would consider them like namespace labels which you get by installing any appexchange package. The thing about them is they are upgradable. So salesforce can upgrade/update the custom lable by putting any patch and it might start breaking your UI /logic. I would not personally use them, unless salesforce explicity documents it.

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.