Use Case: Get a List of Names of Related Records to a Field

A while ago we published a Use Case to create a custom roll-up summary, but it focuses on numerical calculation. Today we will show you how to build the flows If you want to get a list of related records and their names. We will also use a different approach than the previous custom roll-up summary solution.

* Big thanks to Ivan Kovacek for sending in the case!

Lulu Mobile uses standard Account and Case objects. Even though they have a Case related list on the Account page, they still want to have a field to show all the case numbers that the Account has. This helps them search the Account for the case faster in a report. They have already created the field called “All Case Numbers”.

The flow should run whenever a case is created, the case number is updated, or a case is deleted. Different from the previous post, we will create two flows – one handles case creation and update, and the other one handles deletion.

The benefit is that these two flows are nearly identical, so it’s easier to build and maintain. The downside is that if you often edit the child records (ex. Case) in bulk, you might hit the governor’s limits by editing the parent record (ex. Account) more than 12 times.

Thus, carefully evaluate your organization’s needs and choose the solution that works better for you.

Flow 1: Run On Create/Update

Flow 2: Run On Delete

Please wait while flipbook is loading. For more related info, FAQs and issues please refer to DearFlip WordPress Flipbook Plugin Help documentation.

Record-TriggeredAssignmentVariable and Collection
DecisionUpdate RecordsLoop
Get RecordsFormula

Does the solution solve your problem? If not, write us what your problem is and we will build the flow for you!

Official Salesforce Help Article On Flow

Subscribe
Notify of
guest
2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Jaime

Very useful! I am thinking about its implementation and use batch apex to fake update the records so the fields will be populated, I guess with batch apex governor limits will not be reached.