Activity Forums Salesforce® Discussions What is Custom Label in Salesforce?

  • Deepak

    Member
    October 29, 2020 at 6:38 am

    Custom labels are custom text values that can be accessed from Apex classes, Visualforce pages, or Lightning components.

  • Akash

    Member
    October 29, 2020 at 10:34 am

    hi @shweta,

    suppose in your apex class code you want to use some data like API key (personala data or the data that you dont want to show to other)that use in api callout (integration) ,so it is not good to have it hardcoded or for security purppose it is not right to use it directly in code so for that reasone we can use custom label,
    in that custom label we put our api key and give any name to it and save ...now in class code you can use custom label name insted of api key directly...this is one of the use case.

    ----again for dynamic purpose you can use it ,if in case in future that data or like api key is change so withaut any changes in apex class code we can change that data or key here in custom label..

    for more info : use this link :https://webkul.com/blog/how-to-use-custom-labels-in-salesforce/

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos