Skip to Content

TheBlogReaders.com

Salesforce.com, PHP, MySQL, Javascript, Ajax, Htacces

Fetch the Label Value using Salesforce Apex Class and Visualforce Page

Be First!
by March 12, 2013 APEX, SALESFORCE, Visualforce

Fetch the Label Value using Salesforce Apex Class and Visualforce Page
Custom labels are custom text values that can be accessed from Apex classes or Visualforce pages. Yes, we can fetch the Label Value both apex class and visualforce page.

first create a Label using below path:
Setup-> App Setup-> Create-> Custom Labels
Create new label Called ‘Event Title’ and use the below code,
Apex Class:
String printLabel = Label.Event_Title;
system.debug(‘printLabel::’+printLabel);

Visualforce Page:
<apex:sectionHeader title=”{!$Label.Event_Title}” />

Note : we can create up to 5,000 custom labels and they can be up to 1,000 characters in length.

https://help.salesforce.com/htviewhelpdoc?id=cl_about.htm&siteLang=en_US

(3136)

Previous
Next

Leave a Reply