Saturday, July 21, 2018
Friday, July 20, 2018
How to Check Custom Labels Values Using SOQL
Custom labels are custom text values that can be accessed from Apex classes, Visualforce pages, or Lightning components. The values can be translated into any language Salesforce supports.
If you want to create Custom Labels in your Org,
- First, check Custom Label already exists or not based on your value to avoid duplicate Custom Labels in Org.
- If you want to refer Label in apex class
- System.Label.Label_Name
- In VisualForce pages and Lightning Components use the global variable
- $Label
Note: Use Tooling API to Query
if you are using Developer Console, check the screenshot to select Tooling API.
Demo:
Select Id, Name FROM CustomLabel WHERE Value = '<your Value>'
Check the screenshot for more information about the result.
Labels:
Apex,
Configuration,
Custom Labels,
Salesforce,
SOQL
Thursday, July 19, 2018
Check Case Status Picklist Values Marked as 'Closed' Or Not In Apex
In Order to retrieve the Case Status Picklist Values we have Standard Salesforce object "CaseStatus".
CaseStatus object represents a value in the case status picklist. Query the CaseStatus object to retrieve the set of values in the case status picklist.
CaseStatus object represents a value in the case status picklist. Query the CaseStatus object to retrieve the set of values in the case status picklist.
Labels:
Apex,
Case Status,
CaseStatus,
Salesforce,
SOQL
Subscribe to:
Posts (Atom)