se6wagner / triggerx Goto Github PK
View Code? Open in Web Editor NEWA Light Trigger Pattern for Force.com with Event and Recursion Control
Home Page: http://sfdcwizard.com/2013/05/lean-trigger-pattern-for-force-com/
A Light Trigger Pattern for Force.com with Event and Recursion Control
Home Page: http://sfdcwizard.com/2013/05/lean-trigger-pattern-for-force-com/
I've implemented a concrete class that extends TriggerX. This class has an override of the "onAfterUndelete". What I'm trying to do is use this to block undeletion of a particular object type by iterating over the TriggerX records collection and calling "addError" on the objects in the collection to block the undelete. I wrote a unit test to cover this code, but it fails consistently with "Attempt to de-reference a null object". I debugged the problem and it appears to be a bug in the TriggerX.handleTrigger method. On line 120, you are passing "triggerOldMap.values()" to the handler.doConstruct method for "after undelete" events. It's unclear from the Apex documentation, but as far as I can tell, Trigger.oldMap is not available in "after undelete" trigger context. You should be passing triggerNew to the doContruct method for "after undelete" trigger events. I made this change in my local copy of TriggerX and it worked.
Nice work, by the way!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.