Activity Forums Salesforce® Discussions How to use Salesforce dynamic custom label in lightning components ?

  • Prachi

    Member
    November 20, 2019 at 5:01 am

    Hi,

    Use this syntax to access custom labels in Lightning components:

    1.$Label.c.labelName for the default namespace
    2.$Label.namespace.labelName if your org has a namespace, or to access a label in a managed package
    Here are some examples.

    1.Label in a markup expression using the default namespace
    {!$Label.c.labelName}
    2.Label in JavaScript code if your org has a namespace
    $A.get(“$Label.namespace.labelName”)

    Thanks.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos