Mock-Data-Layer-Pattern
apex-rollup
Mock-Data-Layer-Pattern | apex-rollup | |
---|---|---|
1 | 10 | |
9 | 198 | |
- | - | |
1.8 | 7.9 | |
over 2 years ago | 11 days ago | |
Apex | Apex | |
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Mock-Data-Layer-Pattern
-
How to mock formulas and read-only fields in Apex tests?
A while ago we explored the Mock Data Layer Pattern, which allows us to mock virtually any relationships between records within your tests. This is especially handy when trying to improve the performance of these tests - more details here.
apex-rollup
- My Apex won't deploy due to a failure from the Declarative Lookup Rollup Summaries Tool Test
-
Declarative Lookup Rollup Summary (DLRS) not functioning
While I agree that DLRS has its problems (fewer problems today than there used to be but still has problems), I don't think Flows are (yet) up to the task enough for me to recommend them generally for roll-up needs. I am very pro Flow and can't wait for the day I can say that they are. If I were to make a recommendation today it would be apex-rollup: https://github.com/jamessimone/apex-rollup
-
Opportunity Trigger rollup
π hi - author of Apex Rollup here, which I would highly encourage you to use (or any other rollup library) rather than trying to roll your own, as there a number of edge cases that your code doesn't take into account like:
-
Rollup calculation in Campaign Hierarchy
Check out apex rollup, https://github.com/jamessimone/apex-rollup
-
Free Code Based Rollup Solution - Apex Rollup Interview
There's also a (brief, but with extremely detailed picture) section on Rollup Architecture in the Github wiki for the project
-
Sum Values in Related List?
Apex-rollup (was harder for me to configure, but it could be just me; easier on the system): https://github.com/jamessimone/apex-rollup
-
Summary count of all activities in custom field?
Instead of DLRS, you may want to look at implementing Apex Rollup - itβs fairly simple to set up and is more lightweight.
-
DLRS vs Your Own Code vs Flow
If you are looking for something that is considerably more lightweight in comparison to DLRS (and contains well-annotated, object-oriented code ...), I will definitely plug apex rollup
-
Coding With The Force New Salesforce Tutorial Series - Open Source MVP's - Tutorials on How to Use Free Open Source Libraries by the Creators Themselves! This week shows you how to use James Simone's Rollup Library which Allows you to Calculate Rollups on Lookup Relationships (and more) for Free!
In this first episode James Simone, the author of several great open source libraries as well as the Joys of Apex blog has created a tutorial on how to leverage his new Rollup library. This allows you to, for free, calculate Rollup summaries on a variety of relationship types (Lookup, external ids, etc). In the tutorial video he shows you how to leverage Rollup in an auto-launched flow, record trigger flow and from within triggers. Hopefully this makes it super easy for users to leverage this in their orgs.
What are some alternatives?
ApexTestKit - A way to simplify your Salesforce data creation and method stubbing.
NebulaLogger - The most robust logger for Salesforce. Works with Apex, Lightning Components, Flow, Process Builder & Integrations. Designed for Salesforce admins, developers & architects.
lwc-utils - Reusable LWCs to 10x your solution building speed. Design interactive, data-dense UIs with LWC + Screen Flows.
apex-fp - Functional programming for Salesforce Apex
sfdx-mass-action-scheduler - π Declaratively schedule Process Builder, Flows, Quick Actions, Email Alerts, Workflow Rules, or Apex to process records from Reports, List Views, SOQL, or Apex.
Salesforce-Separation-Of-Concerns-And-The-Apex-Common-Library - This repo hopes to better explain Separation of Concerns for Salesforce and how to leverage the Apex Common library to employ it in your org.
ApexDI - A dependency injection framework ported from .Net Core for Apex.
dreamhouse-sfdx - Salesforce Sample App part of the sample gallery. Real estate use case. Get inspired and learn best practices.
sfdc-trigger-framework - A minimal trigger framework for your Salesforce Apex Triggers