I am able access the custom labels created in my org, using Apex, but not the custom labels from a managed package installed in my org. The documentation does not have a specific example to access namespaced custom labels in Apex. I am developing lightning components in a developer edition org (not scratch org).
I have tried the following ways:
System.Label.namespace.CustomLabelName System.Label.namespace__CustomLabelName Label.namespace.CustomLabelName Label.namespace__CustomLabelName
and got the following error message:
External string does not exist: CustomLabelName
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/labels_apex.htm
Has anybody been able to access packaged custom labels from outside the package?
Label.namespace.labelname
orSystem.namespace.labelname
is the correct syntax. Whatever is going on is something else.