[SalesForce] In Flow, how to assign ID field to sobject variables to build sobject collection to Fast Update

What I'm trying to do is in Flow query (Fast Lookup) a Task's TaskWhoRelation records, loop over them to build a new sobject collection of Contact records using the TaskWhoRelation.RelationId, then perform a Fast Update on the built up sobject collection of Contacts.

The part I'm stuck on is that the Assignment element does not let me set the Contact.Id field.

enter image description here

Best Answer

This is a limitation of flows. The Id field is contractually read-only, and so the Flow system won't let you assign a value to the Id field. You will need to use a Fast Lookup or Record Lookup to first query the records you want to update. Even though we wouldn't do this in plain Visualforce/Apex Code (since we already have the ID values), Flows do not allow us to simply call into existence records that are already in the database unless we query them somehow. The alternative to this, which I feel defeats the purpose of using flows, would be to create an InvocableMethod and a series of InvocableVariable declarations, and create the objects in Apex Code.