Category Archives : Salesforce Technical Questions

How to Bulkify Queries for Related Records?

On April 7, 2025, Posted by , In Salesforce Technical Questions, With Comments Off on How to Bulkify Queries for Related Records?

Question: When processing a collection of records in Salesforce, such as Trigger.new, I need to query related records either directly or indirectly. However, querying records in a loop causes me to hit Salesforce’s query limits, which is not best practice. How can I avoid this problem and bulkify my code…

Managing Batch Execution Without DML Limits in Salesforce

On April 7, 2025, Posted by , In Apex,Salesforce Technical Questions, With Comments Off on Managing Batch Execution Without DML Limits in Salesforce

Question How to Create Accounts with Multiple Contacts in Salesforce Without Exceeding DML Limits? I am trying to create accounts and associate 1,000 contacts with each account in Salesforce using a batch class. When managing batch execution without DML limits in Salesforce, I can successfully handle the required number of…

Formula Function Costs in Salesforce?

On April 6, 2025, Posted by , In Salesforce Technical Questions, With Comments Off on Formula Function Costs in Salesforce?

Question: What are the compiled costs of each formula function in Salesforce, and how do these costs contribute towards the 5000 compiled character formula limit? Answer: In Salesforce, each formula function has a compiled cost that adds to the 5000-character compiled formula limit. The compiled size of a formula is…

Can Apex return tables in Agentforce?

On April 1, 2025, Posted by , In Salesforce Technical Questions, With Comments Off on Can Apex return tables in Agentforce?

Question: I am trying to return a formatted table of results in Agentforce using an Apex @InvocableMethod. My scratch org has the features Einstein1AIPlatform and enableEinsteinGptPlatform enabled. The following Apex code is invoked successfully, with debug logs confirming the method completes and returns as expected: The returned inner classes are…

Why Use Static Resources for Third-Party Libraries?

On March 30, 2025, Posted by , In Lightning web components,Salesforce Technical Questions, By ,, , With Comments Off on Why Use Static Resources for Third-Party Libraries?

Question Salesforce recommends using Static Resources to upload and load third-party utility libraries in Lightning Web Components (LWC) or Visualforce (VF) pages, instead of directly referencing external libraries. This guidance is outlined in Salesforce documentation.1. Does Salesforce validate the content of a library or script when it is uploaded as…

Why New Opportunity Quick Action Button Isn’t Showing on Contact

On March 29, 2025, Posted by , In Salesforce Technical Questions, With Comments Off on Why New Opportunity Quick Action Button Isn’t Showing on Contact

Question: I added the standard “New Opportunity” button to the Salesforce Mobile and Lightning Experience Actions section in the Contact Page Layout and saved the changes. Despite this, the button is not visible when I view the Contact record page in Lightning Experience. What steps am I missing or doing…

How to Handle Cascading Deletes for Complex Relationships in Salesforce?

On March 28, 2025, Posted by , In Apex Triggers,Salesforce Technical Questions, By ,, , With Comments Off on How to Handle Cascading Deletes for Complex Relationships in Salesforce?

In our Salesforce org, we have several custom object with deeply nested parent-child relationships (e.g., Object A → Object B → Object C). When deleting a record in the top-level object, we need to ensure that all related child records are properly handled according to specific business rules. Challenges: Questions:…

How to Downloading Source to VS Code?

On March 28, 2025, Posted by , In Salesforce Technical Questions, With Comments Off on How to Downloading Source to VS Code?

Question: I am new to Salesforce and trying to retrieve source code from my scratch org into VS Code. I used the Salesforce CLI (sf) to create a new project and then created some custom objects in my scratch org. Now, I am trying to download the source using the…

How to create a formula specific to the running user in Salesforce?

On March 28, 2025, Posted by , In Salesforce Technical Questions, With Comments Off on How to create a formula specific to the running user in Salesforce?

Question How can I edit a field without triggering validation rules for a specific user in Salesforce? I have a requirement where a particular field should be editable by a specific user without causing the validation rules to fire. If you are wondering how to create a formula specific to…

Apex Callout Fails Due to SunCertPathBuilderException?

On March 23, 2025, Posted by , In Apex,Salesforce Technical Questions, With Comments Off on Apex Callout Fails Due to SunCertPathBuilderException?

Question I am trying to make an Apex callout from Salesforce to an external system hosted inside a corporate firewall. The firewall forwards the request to a load balancer, which then routes it to the appropriate web server. While the callout works correctly when tested from SOAP UI, it fails…