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.

custom Label

Step 2: Below screen will open and click ‘New Custom Label’.

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:-

custom Label edit

Step 4: Finally ‘Custom Label’ will be created successfully and can be used in Apex/Visualforce.

custom-label-list

In Lightning Experience:  Custom Label

Step 1. . Click from right top side in your screen and then click Setup

lightning-exp-create-app-salesforce

Step 2. From the Home tab in Setup, enter Labels in the Quick Find box, and then select Custom Labels.

lightning-exp-custom-labels

Step 3. Below screen will open and click ‘New Custom Label’

lightning-exp-new-custom-labels

Step 4. Fill all details like Name and Value for custom label which needs to be fetched in code as below and Click Save:-

lightning-exp-new-custom-labels-edit

Step 5. Finally ‘Custom Label’ will be created successfully and can be used in Apex/Visualforce.

lightning-exp-custom-labels-apex

Subscribe Now