apex-enterprise-patterns / fflib-apex-common

Common Apex Library supporting Apex Enterprise Patterns and much more!
BSD 3-Clause "New" or "Revised" License
913 stars 517 forks source link

fflib_SObjectDomain and newMap on triggerHandler() #228

Closed lonnieleecomer closed 4 years ago

lonnieleecomer commented 5 years ago

I don't understand why the Trigger.newMap hasn't been exposed using the triggerHandler method? This is very useful in many instances. Can someone explain why it isn't in there? Seems like the easiest fix ever for lacking functionality.

cropredyHelix commented 4 years ago

and why doesn't the RecordsById arg passed to onBeforeUpdate, etc suffice?

daveespo commented 4 years ago

Agreed with @cropredyHelix -- it seems like RecordsById is what you want

The native Trigger property accessors can't be mocked in unit tests