I'm looking for support troubleshooting a record triggered flow that creates records when a lead is converted. When the lead is converted it gets related campaign members and should create records of our custom object, Event Contact Role (ECR). In the flow, the campaign members are added to a record collection (ECR_FromLead). To prevent duplicate ECR's, 1) it gets existing ECR's with the converted contact Id and stores them in a record collection (ECR_Exists), 2) filters existing ECR's from those from the lead. The remaining ECR's from ECR_FromLead are adding to a final record collection ECR_ToCreate.
Event Contact Roles have a lookup to Events. My filter loop loops through the collection ECR_FromLead. The filter action collection is ECR_Exists and filters on loop item Event Ids that does not equal the Event Id of those that exist. The remaining ECR's that don't equal the existing get added to the ECR_ToCreate collection.
When I test converting a lead the flow doesn't seem to fail but no ECR records are created. I can't test my flow in debug because I can't convert a lead. I want to try changing my trigger by I don't know how that would still give me the Converted Contact Id to test parts of the flow.
Thanks in advance!
#Flow #Lead Conversion
Bug: Your != filter is the problem.👇🏼
When there are no existing ECRs, the filtered collection is empty, so nothing ever gets added to ECR_ToCreate — that's why the flow runs without failing but creates nothing. With multiple existing ECRs it also breaks the other way: one different Event makes the filter non-empty, so duplicates slip through.
Fix — replace the filter with a contains check:
- Create a Text Collection variable: Existing_Event_Ids
- Loop through ECR_Exists once, add each record's Event Id to Existing_Event_Ids
- Loop through ECR_FromLead, with a Decision:
- If Existing_Event_Ids contains the loop item's Event Id → do nothing, skip it
- If not → add the loop item to ECR_ToCreate, and add its Event Id to Existing_Event_Ids (this also stops duplicates within the same conversion)
- After the loop, only Create Records if ECR_ToCreate is not empty
For testing: move steps 2-4 into a Subflow that takes Contact Id as input. You can debug the Subflow directly with a Contact Id, without converting a lead.