Almost beat by ChatGPT (not yet) – on an admin/dev task to bulk assign a Salesforce permission set license to all users in a permission set group

With the recent Salesforce’s announcement on end of life of permissions on profiles, permission sets and permission set groups are the future of user management. Permission Set Groups allow bundles of permissions to be assigned to a User. They fill the gap between monolithic Profiles and atomistic Permission Sets, which is nice. Now imagine a …

Certification – Identity and Access Management Architect

Summary The Single Source Many people claim this certification to be one of the most difficult Salesforce multi-choice exams but I don’t think it is as difficult as it sounds although I did not have that much hands-on experience in commercial projects. But it is a relatively self-contained topic with all details that can be …

An anti-pattern causing the “CPU time limit exceeded” error in batch Apex

I recently came across a “CPU time limit exceeded” error thrown from an Apex class that implements the Batchable interface. It is not a typical one caused by excessive Apex logic according to the following observations: There is no stack trace or error details. The error is consistently hit on the first batch of the …

A Salesforce developer’s pair programming experience during the pandemic

Pair programming in the software industry has varying acceptance. The answer to whether developers should do more pair programming is normally opinion based. The recent experience I had with my colleague Simon produced some promising results. We had a few productive pair sessions in two weeks developing a payments feature in our Claims product. After …

A simple Apex trigger framework

Whether one should use an Apex trigger framework or not is probably worth a separate discussion since any abstraction is at a cost and the cost could outweigh the benefits of the framework prematurely introduced. For the case that little business logic needs to be managed in triggers, a general practice is to keep it …

Namespace prefix issues with SObject fields map within managed packages

For lots of the cases, we need to find all fields of an SObject (such as Contact) so we do this: This returns a map with each key being a field name and value being the corresponding SObjectField. Keys have all lower case characters. Confusion comes in on the keys when this code is executed from within a managed package installed …

Salesforce Certified Platform Developer I

After more than 5 years of fiddling around with Apex classes and Visualforce components and focusing on general coding principles, I thought it might be good to learn some of broader Salesforce features that could be easily overlooked by developers. So I took this exam over the weekend: Salesforce Certified Platform Developer I. It was a happy result: …

Object alias in SOQL

The object alias used in SOQL can reduce the number of characters in query string and improve the readability. Suppose there are these objects with parent-child relationship: Parent: ObjectA Child: ObjectB Grand Child: ObjectC And all of these objects have three fields: Field1, Field2 and Field3. A normal SOQL statement that join these objects from …