Retrieving Salesforce Custom Labels Dynamically in Apex

Salesforce developers often face the challenge of retrieving custom labels in their Apex code. Custom labels are a powerful feature in Salesforce that allows developers to manage application text in a centralized location, supporting easy translation and updating. The solution revolves around using a simple yet effective piece of code: public static String getLabelString(String labelName){ […]

Determining the Environment: How Lightning Components Identify Their Context in Salesforce

Salesforce Lightning components are versatile and can be implemented across various Salesforce environments. A common question arises: Can a Lightning component discern if it’s being used in a Community or a standard Lightning Salesforce page? Traditionally, an attribute might be added and set in the Lightning App Builder or Community Builder to differentiate the environment. […]

Add Emoji in Tabs Label on Salesforce lightning Page

Add Emoji in Tabs Label on Salesforce Lightning Page Creating a visually appealing interface is essential for a better user experience in any application. Salesforce Lightning App Builder provides a user-friendly platform to create and customize your apps with ease. Adding icons next to the tabs’ labels within your components can make navigation more intuitive […]

How do you configure Field Service on Scratch Org and get it to work on the Salesforce Field…

How do you configure Field Service on Scratch Org and get it to work on the Salesforce Field Service mobile app? This guide will help you with the minimum setup needed to get Field Service working especially for mobile users. This is the link to Salesforce’s official documentation: https://help.salesforce.com/s/articleView?id=sf.fs_set_up.htm&type=5 Enable Field Service From Setup, enter […]

How to output Salesforce session Id in Apex debug log?

UserInfo.getSessionId() is one of those methods you reach for constantly, mainly when you’re making REST callouts from Apex. The annoyance: you can’t actually see it in your debug logs. Try the obvious approach: Output: Try being clever about it: Same result. Salesforce scrubs session IDs out of logs regardless of how you wrap them. Intentional, […]

Salesforce Reports URL Hacking

After reading this post, you should be able to override report filters using only a url instead of editing the report to add the filters. This can be useful when you want to filter a report per the current record. First of all, you need to create your report or use an existing one. In […]