Skip to content
Home » Blog

Blog

Open box with a lock and chain that was loosed, but inside some books are still locked with another chain

Not so Unlocked Packages

Building a neat UoW wrapper for compounding service methods effectively and merging the Unit of Work approach with updating SObject instances in Triggers.

Bear confused by a lcok

Accidental Permissions

Installing or upgrading a package via Salesforce CLI will add permissions to profile of installing user even if they are not Administrator.

Hand reading through from outside to grab a box

UoW and SObject Instances

Remember that SObjects passed as arguments in Apex point to the same instance, even into the UoW. If you change your variable after registering it as dirty you may affect what gets committed in the end.

Picture illustrating waste

Wasting Time in Disabled fflib Trigger Handlers

Did you know that you can dynamically disable fflib_SObjectDomain Trigger Handlers? You did? Ok then, did you know that when you do disable them their constructors run anyway? So be careful not to put any (expensive) logic inside those.

Puzzle with a missing piece

UoW’s Dirty Little Secret

Did you know that you have to be super careful with registering records as dirty with a Unit of Work? If you happen to register the same record a second time you can lose your original registered updates. This is especially likely when you are trying to use the UOW to help your big’ol trigger handler be a bit less recursive.

Image of the DFA approach to analysis of Salesforce Graph Engine

SFDX GitHub Code Review – Part 3

A few months back the result of this post series was tagged in a GitHub conversation about SFDX code scanner. I was chuffed and determined to find time to finally make it more complete. Over the holidays I finally found a bit of that time …