Skip to content

Instantly share code, notes, and snippets.

@rsoesemann
Last active January 28, 2019 20:34
Show Gist options
  • Save rsoesemann/4cc528993509884ff16ae20e49ce1f51 to your computer and use it in GitHub Desktop.
Save rsoesemann/4cc528993509884ff16ae20e49ce1f51 to your computer and use it in GitHub Desktop.
Logic-free trigger handler with overlap and centralized functionality
public with sharing class Accounts extends fflib_SObjectDomain {
public Accounts(List<Account> records) {
super(records);
}
public override void onAfterUpdate(Map<Id,SObject> old) {
new UnitOfWork(records)
.execute(new CheckTeamPermissions())
.execute(new EnhanceData())
.execute(new UpdateLeadScore())
.commit();
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment