function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
RahulBorgaonkar@BritsafeRahulBorgaonkar@Britsafe 

Flow not working , error while looping through

Hi,

I have written a flow which should search for a product with core product flag equals true and updates product field value on another record related to product. But it is not looping through product to search for core product.
I can see that 'Next Element' arrow is also showing 'FAULT' message in return arrow.

Please find flow diagram below.

User-added image

Also sharing log output for you ref.

How the Interview Started
Some of this flow's variables were set when the interview started.
varSubscriptionId = a0MD000000Koxu1

FAST LOOKUP: Find_Related_Subscription_Lines
Find all Subscription_Line__c records where:
Subscription__c Equals {!varSubscriptionId} (a0MD000000Koxu1)
Assign those records to {!arrSubscriptionLines}.
Save these field values in the variable: Id, Product__c
Result
Successfully found records.

LOOP: Loop_Through_Subscription_Lines
Loop Through: [a0sD000000UClVgIAL,a0sD000000UClVhIAL,a0sD000000UClViIAL]
Iteration: 0
Current value of {!colSubscriptionLines}: a0sD000000UClVgIAL

FAST LOOKUP: Find_Core_Product
Find all Product2 records where:
Core_Subscription_Product__c Equals true
Id Equals {!colSubscriptionLines.Product__c} (01t20000001mCjgAAE)
Assign those records to {!varCoreProduct}.
Save these field values in the variable: Subscription_Format__c
Result
Failed to find records.

RECORD UPDATE: Update_Subscription
Find all Subscription__c records where:
Id Equals {!varSubscriptionId} (a0MD000000Koxu1)
Update the records’ field values.
Membership_Type__c = {!varCoreProduct.Subscription_Format__c} (null)
Result
All records that meet the filter criteria are ready to be updated when the next Screen or Wait element is executed or when the interview finishes.

Could you please help?

Thanks and Best Regards,

Rahul