Last active
December 15, 2018 20:39
-
-
Save noakesey/eb706821f6b93e04eed806a3a435812e to your computer and use it in GitHub Desktop.
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
/// <summary> | |
/// Class extensions should have an Extension suffix, and should include the name | |
/// of the extending model as an infix to maintain uniqueness. The extension class | |
/// must be marked as final as it would make no logical sense to subclass | |
/// or extend an extension. | |
/// </summary> | |
[ExtensionOf(classStr(CustTransSettlement))] | |
final class CustTransSettlement_MyNewModel_Extension | |
{ | |
protected boolean isTransTypeValidForInsertSettlementLines(CustTrans _custTrans) | |
{ | |
//We must always call the next handler in the Chain of Command (CoC) even if | |
//we really don't wan't or need to. | |
//The only guarantee about sequence is that the standard version will run last. | |
next isTransTypeValidForInsertSettlementLines(_custTrans); | |
//Override the standard result with our own logic, but put the logic somewhere else | |
//to keep this method assimple as possible to protect against future | |
//framework changes. | |
return MyOtherClass::SomeOtherMethod(_custTrans); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment