Apex sObject Examples

sObjects are great for dynamic apex where you need to re-use code across objects and/or need to dynamically set data. I’ve had several projects where the same logic is used across many objects such as date, territory, and ownership. Recently had a use case where I used sObjects and a custom setting with a list of…

Silly Admin Trick: Disable Customer Portal Navigation Bar

In Salesforce Classic when you create your first community (Customer Portal) Salesforce puts a black navigation bar at the very top of the page that allows you to quickly toggle between the standard user interface and your customer portals. It…is annoying and for some reason since I rarely run in to this I forget how to disable it…

Mass Edit Button for Lightning Related List

Inline editing is super easy in Salesforce Lightning but not from a related list on a record page. So this is a quick and easy way to without a controller create a VF page that can be used as a button to update a field selected records in a related list. Just flip the object…

Apex Class working with both Trigger and Batch

Sometimes there is a need for a class to execute based on a record value (checkbox) or as part of a scheduled batch job. Not a new concept but you will get this error: Static method cannot be referenced from a non static context So a quick fix is to just create a non-static method that…

VS Code Quick Tip: Disable Quick fix available Lightbulb

July 2019 Update: They ended up fixing this…but boy was it annoying. VS Code is great but after a recent update I started getting a lot of suggestions to created classes in triggers for classes that already exist. I’m sure it is a bug but it was a distraction so after more searching than necessary…

Silly Admin Trick: How to Access Salesforce “Platform Integration User” Profile

While trying to disable a record type I got the following message: This Record type Record_Type_Name Cannot be deactivated because of the following profiles use this record type as default. Upon clicking the profile “Platform Integration User” I get the “Insufficient Privileges”, so sad. Looking at the article linked below I put this URL together to access…