Friday, 16 March 2018

Custom labels in salesforce

Custom labels are used to store text values which can later be used in apex classes, triggers, visualforce pages etc.
These enables the developers to display text values in multiple languages to help customer to read texts in its native language.

For creating a custom label developer can go to setup --> custom labels --> new custom label



Enter the values and click save.

To access value in apex class and trigger use below syntax:-
system.label.Custom label api name

To access value in VF pages and lightning components use below syntax:-
{!$Label.Custom label api name}

No comments:

Post a Comment

Create record in lightning

With the advancement of lightning, we are getting introduced to new features of lightning that helps in creating a better functionality in ...