Open in app

Sign In

Write

Sign In

Ben Butler
Ben Butler

197 Followers

Home

About

Jan 24

How To Add Calculated Column in Salesforce Reports

Edit a report and open “Add Row-Level Formula”

Salesforce

1 min read

How To Add Calculated Column in Salesforce Reports
How To Add Calculated Column in Salesforce Reports
Salesforce

1 min read


Oct 22, 2021

Orchestrate Messages Between Packages in Salesforce

The “Core Package” in Salesforce is a shared dependency of two or more other packages. The core package is also core to decoupling communication between packages. Because unrelated packages can access the Core Package, the Core can be used to orchestrate messages between them using interfaces. Start by abstracting an orchestrator public class ClosingEventOrchestrator { public static void orchestrate(List<Opportunity> opps){ for (ClosingEventConsumerSubscription__mdt flow : [SELECT ApexClass__c FROM ClosingEventConsumerSubscription__mdt ORDER BY Order__c]){ IClosingEventConsumer consumer = (IClosingEventConsumer)Type.forName(flow.ApexClass__c).newInstance(); consumer.consume(opps); } } }

1 min read

Orchestrate Messages Between Packages in Salesforce
Orchestrate Messages Between Packages in Salesforce

1 min read


Oct 15, 2021

Log Apex Right using Dependency Inversion Principle

The Dependency Inversion Principle says: Depend in the direction of abstraction. High level modules should not depend upon low level details. An example of a higher level module depending on lower level details is this logger public class RulesEngine { public RulesEngine(){} public void…

Salesforce

1 min read

Salesforce

1 min read


Oct 7, 2021

TDD LWC with Jest in Salesforce

There is a basic practice in test driven development. Red, Green, Refactor. Red: start writing a test until it fails Green: write the solution up until the test doesn’t fail Refactor: refactor the code to keep it clean Bob Martin explained three rules for TDD Write production code only to…

Salesforce

2 min read

Salesforce

2 min read


Oct 1, 2021

Separation of Concerns Now in Triggered Flows in Salesforce

Salesforce now allows subflows to be called from record triggered flows. We can now separate the logic of triggered flows from the trigger itself. This allows us to have a cleaner and more modular flow structure. Record-triggered flows can now be reduced to the bare minimum. The flow has a…

Salesforce

2 min read

Separation of Concerns Now in Triggered Flows in Salesforce
Separation of Concerns Now in Triggered Flows in Salesforce
Salesforce

2 min read


Sep 24, 2021

Smart DML Management with Unit of Work Pattern in Salesforce

Financial Force has provided us a convenient unit of work (UOW) pattern. Martin Fowler originally described it as a way manage the nuances of making database statements. We can consolidate DML we want to do into a single command and save actually performing a single DML operation until after all…

2 min read

2 min read


Sep 16, 2021

Salesforce SOQL-Free Apex Tests with Selector Pattern

With Apex a Selector Pattern provides multiple benefits including A centralized place to query once, minimizing the number of queries The ability to test the queries in the Selector independent from the classes that utilize the Selector Selector Patterns can allow for a configurable query. …

Soql

2 min read

Soql

2 min read


Sep 9, 2021

Salesforce: Separating a Service Into Unlocked Packages

Unlocked packages allows us to think in terms of services. We can release a stand-alone service apart from others. But even an individual system can be broken up to resemble the intrinsic separations of an individual service. 1. Package Objects as a Dependency Custom Objects Custom Fields Layouts Object Permissions Data is at the core of…

Salesforce

2 min read

Salesforce: Separating a Service Into Unlocked Packages
Salesforce: Separating a Service Into Unlocked Packages
Salesforce

2 min read


Sep 3, 2021

Salesforce Apex: Underused Operators

Some Apex operators seem underutilized. They are an easy way to make the code succinct, a bit cleaner, and a bit easier to maintain. x |= y //x = x || y x &= y //x = x && y z = x?.y //z = (x == null) ? null : x.y;

1 min read

1 min read


Aug 27, 2021

Five Different Ways of Using Functions

These are a few of the many ways of doing the same thing in JavaScript Imperative function add1(){ return 1; } function add2(){ return 2; } function add3(){ return 3; } console.log(1 + add1() + add2() + add3()); Composing function add1(num){ return num+1; } function add2(num){ return num+2; } function add3(num){ return num+3; } console.log(add1(add2(add3(1)))); Currying function add1(num){ return add2(num+1);} function add2(num){ return add3(num+2);} function add3(num){ return num+3;} console.log(add1(1));

1 min read

1 min read

Ben Butler

Ben Butler

197 Followers

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech

Teams