Last active
January 28, 2019 20:34
-
-
Save rsoesemann/4cc528993509884ff16ae20e49ce1f51 to your computer and use it in GitHub Desktop.
Logic-free trigger handler with overlap and centralized functionality
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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