▶️ SUBSCRIBE TO MY YOUTUBE CHANNEL: / @paduarte
A quick demo to show how you can loop through grouped records using Salesforce Flow. In this solution, we group records based on a criteria (Team Member Name) and add its record Duration to a variable - which we later compare it to a Custom Metadate Type.
USE CASE:
We have Time Sheet and Time Sheet Entry objects.
A Time Sheet record is used once PER day and it includes all of that days' Time Sheet Entry records for all 3 team members.
A Time Sheet Entry record is created per Team Member and per job they complete that day - capturing the Start and End Time of that job.
A formula field calculates the duration in minutes between the start and end time.
The Flow needs to group all Time Sheet Entry records PER team member, add up its duration per record (to create a total duration value in minutes) and then compare this total value with the Custom Metadata Type.
If the total duration exceeds that of the Custom Metadata Type, the Time Sheet Records (parent record) need to be updated with a Validation Message - where an end-user will review.
コメント