SFDO-Community / declarative-lookup-rollup-summaries

Declarative Lookup Rollup Summaries (DLRS) is a community built and maintained Salesforce application that allows you to create cross object roll-ups declaratively - no code! For install instructions and documentation, visit our website https://sfdo-community-sprints.github.io/DLRS-Documentation/
https://sfdo-community-sprints.github.io/DLRS-Documentation/
BSD 3-Clause "New" or "Revised" License
683 stars 235 forks source link

QA/QE: Add to QA dataset: Rollup where the relationship field is a string, not a lookup #1402

Open mkolodner opened 8 months ago

mkolodner commented 8 months ago

One of DLRS's more obscure capabilities is that the rollup does not have to go across an actual relationship field. As long as the field designated as the relationship field holds a string of an 18 character Id, DLRS can handle that.

  1. A custom field that's text (18 characters) already exists (QALookupChild.Parent_by_String__c)
  2. Add parent objects and then child objects with Ids of parents in the field (Snowfakery task)
  3. Add a rollup that works across that text field
  4. Add automated testing that checks that the rollups are correct.
  5. Relationship field is created along with three test records.
  6. Upon insert the lookup by string field has the Id of records that don't exist (because Ids have changed). Will need something to fill this with valid results!
  7. Rollup is created.
acrosman commented 8 months ago

To generate data for this pattern with Snowfakery would require two passes. First, load a set of Parent records, then pull back their Ids using a query, and use those queries to populate the field. Documentation on that process is here: https://snowfakery.readthedocs.io/en/latest/index.html#iterate-over-salesforce-datasets