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

  • This is a bit confusing as to where you are in the flow (have you already queried for the Contacts)?
    – cropredy
    Commented Dec 26, 2016 at 23:00
  • @cropredy, I have not queried any Contacts, only the TaskWhoRelation object. My goal is to not query Contacts since I already have the IDs from the TaskWhoRelation.RelationId field. Thanks
    – Doug Ayers
    Commented Dec 26, 2016 at 23:04
  • 1
    sfdcfox has it pegged;
    – cropredy
    Commented Dec 27, 2016 at 0:33

1 Answer 1


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.

  • Thanks @sfdcfox, I've resorted to an invocable apex class to parse the relations and return back list of contacts.
    – Doug Ayers
    Commented Dec 26, 2016 at 23:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .