Apex API 61: No More Private Method Overriding?
Question After upgrading from API version 60.0 to 61.0, I noticed an unexpected change in the behavior of inheritance for inner classes in Apex. Specifically, I observed that private methods in a superclass are no longer overridden by an inner class in the subclass when both methods have the same…
How to Retrieve Public Email Templates by FolderName?
Question I have been trying to retrieve all the public email templates by querying for templates within the ‘Public Email Templates’ folder. Here’s the query I attempted: However, this query does not seem to work. When querying an email template, I can see that the Folder.Name indeed displays as ‘Public…
Handling Complex Data Types in Dynamic SOQL Queries in Apex
Question How Can I Elegantly Convert a Set of Ids into a String for Use in a Dynamic SOQL IN Comparison? When I have a Set and need to use it in a dynamic SOQL query for an IN comparison, I currently convert the set into a string in the…
Get Dependent Picklist Values in Apex?
Question I have a pair of dependent picklists in Salesforce. In Apex code, how can I determine the valid options in the dependent field for each value in the controlling field? For example, consider the following picklists: Controlling Field (Controlling_Field__c): Dependent Field (Dependent_Field__c): I tried using getPicklistValues(), but it does…
What are static code analysis tools for Apex?
Question: Are there any static code analysis tools available for Apex? I am aware of the Force.com Security Source Code Scanner, but it has the drawback of requiring requests to be placed in a queue and run remotely, which slows down the development process. Is there a tool I can…
Why Is My Salesforce Webhook Returning “FORBIDDEN”?
Question I recently set up a Stripe Webhook endpoint in our Salesforce sandbox, and it worked perfectly when tested via Postman and Stripe. However, after deploying it to production, I started encountering the following error whenever I tried to access the endpoint via Postman or directly in a browser: I…
How Can I Tell the Day of the Week of a Date?
Determining the day of the week from a given date is a common requirement when building logic in Salesforce. You might be asking, “How can I tell the day of the week of a date?” You can achieve this using Apex code or Salesforce formulas. Here’s how to approach this…
Does JSON Serialization Break SObject Equality?
Question: When an SObject containing Decimal fields is serialized and deserialized using JSON, the equality operator (==) no longer returns true, even if the field values appear identical. Why does this happen, and how can it be fixed? For example: Interestingly, if the Amount field values are logged: The values…
What Are Controllers and Extensions in Visualforce?
Question Explain the usage of controllers and extensions in Visualforce, and in which scenarios should each be used? Answer In Visualforce, controllers and extensions are both used to manage the logic of your page, but they serve distinct roles and have different characteristics. Understanding the difference is crucial to using…

