Where Should I Start Learning Salesforce Development?
Question: I want to start learning Salesforce development, but there are so many topics like Objects, Classes, Apex, Visualforce, SOSL, SOQL, and Triggers. With so many options available, I am unsure which topic to learn first and how to progress step by step to gain proficiency in all aspects of…
How Can I Get Debug Log for Guest User in a Salesforce Site?
Question Normally, you can enable debug monitoring on a specific user to troubleshoot errors they encounter, such as the generic “Error Loading a Visualforce Page.” However, when debugging a Salesforce public site, how can you capture debug logs for the guest user? Answer You can enable debug logging for the…
How to Capture LWC Click Events in Logs?
Question: Capturing Lightning Web Component (LWC) clicks in Salesforce event logs is not natively supported. However, you can implement a custom solution to track and log user interactions. One approach is to use the Event Logging Framework in Salesforce, which captures platform events, or you can send logs to Transaction…
Prevent Toggle from Clicking Outside?
Question: I have a toggle switch in my Aura component, but clicking anywhere within the label (not just the checkbox) triggers the toggle. I want the toggle to change only when clicking directly on the checkbox itself. How can I achieve this? Answer: The issue occurs because the label for…
Set Lookup Relationship via Name Pointing Field?
Question Can a lookup relationship be set using the __r name pointing field when inserting a record? A well-known post by Bob Buzzard suggests that you can relate records by assigning a nested sObject with an external ID in the __r field. However, this has been debated, with some arguing…
External Credentials for OAuth Client Credentials Flow?
Question: How can we use External Credentials and Named Credentials in Salesforce to authenticate and access a REST API that requires OAuth 2.0 Client Credentials flow (grant_type=client_credentials)? The goal is to implement a secure and managed integration where Salesforce acts as a backend system calling an external API without requiring…
Ensuring Field Value is Available Before Filtering Picklist?
Question: I have a Lightning Web Component (LWC) that displays a custom path. The component relies on a record field value to determine which picklist values should be displayed. However, I am encountering an issue where the field value is not available when the picklist filtering logic runs. The component…
Imported Task Not Showing as Call Logged?
Question: I imported task records manually using Data Loader, expecting them to appear as “Call Logged.” However, after the import, they are only showing as “Task Created.” Why is this happening, and how can I ensure that imported tasks reflect the correct status? Answer: According to Salesforce Support, this behavior…
How to Properly Use Static Variables in Apex Dynamic Queries?
Question Issue with Using Static Variables Directly in Dynamic Queries When working with dynamic queries in Apex using Database.query(), you may run into an issue when trying to reference a static variable from another class directly in the query. The following code works as expected: However, if you try to…
SOQL AVG Unexpected Behaviour, Incorrect Result?
Question: I am working on the Advanced Apex Testing module in Trailhead and encountered an unexpected behavior when using AVG(Amount) in a SOQL query. Here’s the scenario: I have one Account and one Opportunity linked to it.The Opportunity has a Stage of “Prospecting” and an Amount of 1000.00.In my test,…

