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
Monday, July 16, 2018
How To Check Page Layout Assignment Using SOQL Query
This post explains how to check page layout assignment using SOQL.
1. We can see the Page Layout is assigned to any profile or not.
2. We can see the RecordTypeId also, means we can See the Record Type assignment also.
Note: Use Tooling API to Query, Please Select Tooling API while Querying.
If you are using Developer Console to query
Demo:
Happy Learning!!
1. We can see the Page Layout is assigned to any profile or not.
2. We can see the RecordTypeId also, means we can See the Record Type assignment also.
Note: Use Tooling API to Query, Please Select Tooling API while Querying.
If you are using Developer Console to query
Demo:
SELECT Layout.Name, Layout.TableEnumOrId, ProfileId, Profile.Name, RecordTypeId FROM ProfileLayout WHERE Layout.Name='<Layout Name>' AND Layout.TableEnumOrId = '<object Name OR object ID>'
Check below screenshot for more information about result.
Labels:
Configuration,
Page Layouts,
Record Type,
Salesforce,
SOQL
Subscribe to:
Posts (Atom)