You need to sign in to do that
Don't have an account?
Kathleen Elisabeth Smith
Get & Delete Tasks Related to Record that Triggered the Flow
I'm creating a record-triggered flow that is supposed to trigger every time an Account record is updated, when the checkbox field "Good to Clean" equals "True". From there, it is supposed to:
However, when I debug the flow, it gets stuck after the delete records. When I run the flow itself in my Sandbox, it only deletes 1 record that is unrelated to the account that triggered the flow. Below is a picture from the debug log. The account that triggered the flow only has 3 tasks on it, so it shouldn't be grabbing that many.
Would someone be able to help me out and see where I'm running into the issue so that it doesn't grab the tasks related to the account that started the flow?
- Get Records: gets tasks where the WhatID equals the Account ID
- Loop: Loops through the record collection to delete each task record
- After Last Item it Gets Records: gets tasks where the WhoID equals the Contact ID
- Loop: Loops through the record collection to delete each task record
- After Last Item: it updates the "Good to Clean" field and sets to "False"
However, when I debug the flow, it gets stuck after the delete records. When I run the flow itself in my Sandbox, it only deletes 1 record that is unrelated to the account that triggered the flow. Below is a picture from the debug log. The account that triggered the flow only has 3 tasks on it, so it shouldn't be grabbing that many.
Would someone be able to help me out and see where I'm running into the issue so that it doesn't grab the tasks related to the account that started the flow?
I updated the flow and combined the two Get Records. Still running into the same issue when debugging. Here are two photos, one of the getter and one of the contact variable.