Category Archives : Salesforce Technical Questions

Publishing Platform Event with JSON in a Text Field?

On February 26, 2025, Posted by , In Apex,Salesforce Technical Questions, With Comments Off on Publishing Platform Event with JSON in a Text Field?

Question When attempting to publish a Platform Event with a valid JSON object inside a custom text field (Message__c), the serialized JSON string appears with backslashes before special characters such as double quotes (“). For example, when assigning the following JSON to Message__c: The resulting event payload contains an escaped…

Downloading Large Files and Uploading to Salesforce Static Resources

On February 25, 2025, Posted by , In Salesforce Technical Questions, With Comments Off on Downloading Large Files and Uploading to Salesforce Static Resources

Question: I need to download a large .gz file and upload it to Salesforce as a Static Resource. The file is significantly larger than Salesforce’s HTTP response size limit (6 MB), making direct download via an Apex HTTP callout infeasible. My goal is to: Answer: I attempted an HTTP callout…

Retrieving Components from Your Managed Package Version in Salesforce

On February 24, 2025, Posted by , In Salesforce Technical Questions, With Comments Off on Retrieving Components from Your Managed Package Version in Salesforce

Question: I have a developer org where I created a 1st-generation managed package with an assigned namespace. Over a year ago, I uploaded a released package version. Since then, I’ve implemented bug fixes, added features, and now plan to upload a new released package version. However, I need to create…

CheckMarx FLS Violations for Dynamic SObjects in Apex?

On February 23, 2025, Posted by , In Apex,Salesforce Technical Questions, With Comments Off on CheckMarx FLS Violations for Dynamic SObjects in Apex?

Question: In Salesforce Apex, handling objects dynamically using the generic SObject type allows for flexible and reusable code that can work across different Salesforce objects. However, this dynamic approach creates challenges for static code analysis tools like CheckMarx and PMD. For example, consider the following code snippet where QuoteLineItem records…

What Is the Difference Between Controllers and Extensions in Visualforce?

On February 22, 2025, Posted by , In Salesforce Technical Questions, With Comments Off on What Is the Difference Between Controllers and Extensions in Visualforce?

Question: Can someone explain the usage of controllers and extensions in Visualforce? When should we use a controller, and in what scenarios should we opt for an extension instead? Answer: In Visualforce, controllers and extensions define the behavior of a page, dictating how it interacts with Salesforce data and performs…

Hide Specific Buttons on Order Products Related List?

On February 21, 2025, Posted by , In Salesforce Technical Questions, With Comments Off on Hide Specific Buttons on Order Products Related List?

Question: Is it possible to control the visibility of the “Add Products” and “Edit Products” buttons on the Order Products related list? The only solution we have found so far is to hide both buttons by disabling the “Show list view action bar” option. We then created two duplicate related…

Automating Admin Approved Users Policy for Managed Package Apps

On February 20, 2025, Posted by , In Salesforce Technical Questions, With Comments Off on Automating Admin Approved Users Policy for Managed Package Apps

Question: I am building a Managed Package that includes an External Client App using the JWT Bearer Token Flow for authentication. One critical requirement is to ensure that the OAuth Policy of the Connected App is set to “Admin approved users are pre-authorized” automatically when the package is installed in…

Setting Lightning Datatable Width for Horizontal Scrolling?

On February 19, 2025, Posted by , In LWC Essentials,Salesforce Technical Questions, With Comments Off on Setting Lightning Datatable Width for Horizontal Scrolling?

Question When configuring a related list in a Lightning page, the rendered table has a <div> with a specific width derived from column widths, allowing horizontal scrolling. This prevents columns from being squished while ensuring users can scroll to view all data. In a custom Lightning Web Component (LWC) using…

Cloning Salesforce Objects and Projects to a New Org

On February 18, 2025, Posted by , In Salesforce Technical Questions, With Comments Off on Cloning Salesforce Objects and Projects to a New Org

Question: I have a Salesforce project in an existing Developer Edition org, and I want to create a new Developer Edition org where I can replicate all objects, layouts, and configurations from the existing org. Additionally, I need to make changes in the new org without affecting the existing one….

How to line break on dataraptor formula?

On February 17, 2025, Posted by , In Salesforce Technical Questions, With Comments Off on How to line break on dataraptor formula?

Question: How can I insert a line break in a formula inside a DataRaptor? I need the formatted text to display properly in a document template. For example, I want the following formula to produce a line break: Is there a way to format the text so that it appears…