Skip to main content

Posts

Showing posts from September, 2013

Custom Labels

Can we have multiple values in Custom Labels. Yes, Salesforce supports multiple values in custom Labels. How to implement that ? Create a New custom label and provide Multiple values with comma ( , ) separated. Example:   Custom Label Name: School Values: Test,Exam,Tutions How to access this Custom Label in Apex controller / Class file Syntax: System.Lable.CustomLabelName Example:System.Label.School How to access this Custom Label in Visualforce page Syntax: !$Label.CustomLabelName Example: !$Label.School How do we check if TempString is present in the custom label in a controller ? Syntax: System.Label.CustomLabelName.Contains(value) Example: System.Label.School.contains(TempString) How do we check if TempString is present in the custom label in a visualforcepage? Syntax: CONTAINS($Label.CustomLabelName,TextValue) Example: CONTAINS($Label.School,"Text")
SFDC : S ales F orce D ot C om Salesforce.com is a software as a service (SaaS) company that distributes business software on a subscription basis
'Render' property in Visualforce page -  Conditionally rendering  We can have a field evaluated based on multiple  condition. Eg : <apex:inputField id="xxxif2" value=" {!Object.Fieldtobedisplayed1}" rendered=" {IF(Object.picklistfieldapiname1 ='picklist value 1' ||  lead.Buyer_Type__c ='picklist value 2'  ,true,false)}"/> Note: Observe that after the || symbol '!' symbol is n ot present.