Category Archives : Salesforce Technical Questions

SOQL LAST_N_DAYS:30 vs. Reports: Why Different Results?

On September 11, 2025, Posted by , In Salesforce Technical Questions,SOQL, With Comments Off on SOQL LAST_N_DAYS:30 vs. Reports: Why Different Results?

Question I noticed a discrepancy between SOQL queries and Salesforce reports when filtering for the last 30 days. In a Salesforce report, selecting “Last 30 Days” includes records from 2024-11-14 to 2024-12-13, exactly 30 days (including today). However, when I run the following SOQL query: it includes records from 2024-11-13…

Salesforce Org Authorization Fails in VS Code?

On September 9, 2025, Posted by , In Salesforce Technical Questions, With Comments Off on Salesforce Org Authorization Fails in VS Code?

Question: I can create a Salesforce project in VS Code, but when I try to authenticate an org, it opens a browser where I enter my credentials. The browser confirms “Authentication successful,” but in VS Code, the process remains stuck at “in progress.” If I cancel it, I get the…

Sending Form-Data in Apex Callout to Auth0?

On September 4, 2025, Posted by , In Apex,Salesforce Technical Questions, With Comments Off on Sending Form-Data in Apex Callout to Auth0?

Question: I need to send a multipart/form-data request from Salesforce Apex to Auth0’s /api/v2/jobs/users-imports endpoint. I have limited experience working with form-data requests. I structured the request body as follows: My Apex code: However, I keep getting this error response: What is wrong with my request, and how can I…

Send Survey to Case SuppliedEmail When Case is Closed?

On September 3, 2025, Posted by , In Salesforce Technical Questions, With Comments Off on Send Survey to Case SuppliedEmail When Case is Closed?

Question I have created a survey to collect customer feedback and want to send it to the SuppliedEmail field on the Case object when the case is closed. I checked the Case Auto-Response Rules and the Support Settings > Customer Feedback Survey, but I couldn’t find an option to send…

How to Block Recursion in a Generic Trigger Handler?

On September 1, 2025, Posted by , In Apex,Salesforce Technical Questions, With Comments Off on How to Block Recursion in a Generic Trigger Handler?

Question When implementing a generic trigger handler that processes all TriggerOperation types and supports arbitrary SObjectType, recursion can become a major issue. Recursion occurs when a trigger causes an update that invokes the same trigger again, leading to infinite loops or redundant processing. Consider the following example trigger: With the…

Combobox Performance Issue in LWC?

On August 27, 2025, Posted by , In Apex,Salesforce Technical Questions, With Comments Off on Combobox Performance Issue in LWC?

Question: I am facing a performance issue with a combobox in LWC. I found similar questions suggesting that using the spread operator on the data should work, but it still takes a lot of time to load. However, when I pass the data as a JSON string and parse it,…

Why Isn’t refreshApex Working in My LWC?

On August 25, 2025, Posted by , In LWC Essentials,Salesforce Technical Questions, With Comments Off on Why Isn’t refreshApex Working in My LWC?

Question I created a Kanban board following a tutorial. Everything works except one issue: when a user drags and drops a card, it should refresh the Apex method to display the card in the correct column. However, the card stays in the same column even though a success notification appears….

Contact Mass Update – Apex CPU Time Limit Exceeded?

On August 21, 2025, Posted by , In Apex,Salesforce Technical Questions, With Comments Off on Contact Mass Update – Apex CPU Time Limit Exceeded?

Question I am trying to perform a mass update on Contact records using Execute Anonymous, but I keep getting the following error: System.LimitException: Apex CPU Time Limit Exceeded Here is the code I am using: What is causing this error, and how can I optimize my approach to avoid hitting…

Passing Parameters to a Lightning Component Quick Action?

On August 19, 2025, Posted by , In LWC Essentials,Salesforce Technical Questions, With Comments Off on Passing Parameters to a Lightning Component Quick Action?

Question: I have a Lightning component that is used as a quick action on multiple objects, such as Account and Contact. When the component is invoked, I can retrieve the recordId using: However, I also need to pass a custom parameter when invoking the quick action and retrieve it inside…

Updating PermissionSetTabSetting Without Metadata API?

On August 14, 2025, Posted by , In Apex,Salesforce Technical Questions, With Comments Off on Updating PermissionSetTabSetting Without Metadata API?

Question: I need to update the visibility settings for tabs within a Permission Set in Apex. I successfully retrieved PermissionSetTabSetting records but encountered an issue when trying to upsert changes in a loop. Here’s my approach: However, I keep getting this error:System.DmlException: Upsert failed. First exception on row X; first…