Custom Label
Custom labels are custom text values which we can access in Apex classes, Visualforce pages, or Lightning components. The values can be translated into any language which is supported by Salesforce . Main advantage Custom Label offers is it enables flexibility in code and values being fetched in code can be changed anytime without need to change code itself.
To access custom labels:-
Step 1. from Setup, enter Custom Labels in the Quick Find box, and then select Custom Labels.
Step 2: Below screen will open and click ‘New Custom Label’.
Step 3: Fill all details like Name and Value for custom label which needs to be fetched in code as below and Click Save:-
Step 4: Finally ‘Custom Label’ will be created successfully and can be used in Apex/Visualforce.
In Lightning Experience: Custom Label
Step 1. . Click from right top side in your screen and then click Setup
Step 2. From the Home tab in Setup, enter Labels in the Quick Find box, and then select Custom Labels.
Step 3. Below screen will open and click ‘New Custom Label’
Step 4. Fill all details like Name and Value for custom label which needs to be fetched in code as below and Click Save:-
Step 5. Finally ‘Custom Label’ will be created successfully and can be used in Apex/Visualforce.