I created a simple record triggered after save flow in Salesforce that should take all related Contacts from an Account and update Email field of these Contacts with specific value.
To iterate over Contact records I used Loop and I also used Assignment element to assign value to Contact Email field.
In the Update Records element I simply use record collection variable to update my Contacts' Email field.
However in debug log, changes to email field done via Assignment element are not made and Email field is not updated, it stays blank. I also saw in debug log that Assignment process worked fine.
Assignment element screenshot
Can you please help me in explaining what is the mistake?
Best Answer
There is an issue in the assignment block. As mentioned above by @cropredy You have to add the current element in the loop to a collection variable and update the collection variable as shown below.
Variable for holding a Collection:
assigning the Account email to the current loop
Adding the current element to the collection.
Updating the collection