I am sure this might be easy but I'm very new to flow and couldn't figure out how to achieve the below requirement and feeling trapped in a loop.

Requirement is:

When all of the necessary Subject records have been added to a Chronology, the user selects the ‘Find Events’ button which then fires a flow that finds all of the CONTACTS and Persons linked to the Chronology and then uses that list to find all relevant Events. For each Event, a corresponding Chronology Item record is created

Data Model:

Chronology Items: lookup: Chronology AND Event

Subjects: lookup: Chronology, contact and Persons

I tried to this way:

  1. Get records: Chronology with the record id
  2. Get records from the subject with matching same record id
  3. Get records: relevant events
  4. loop: on event
  5. create records for chronology items.

enter image description here

Maybe I'm failing to fetch the right records. any help would be appreciated. thank you

  • Do you have to create Chronology records under the related Contacts -> events? I dont understand the object relationship, how are chronology, subject, contacts related? Commented May 20, 2021 at 17:50
  • Please edit to add detail to your question. What is your Flow currently doing? Can you add more specifics about what the expected outcome is? Are you receiving an error? Your description of the schema is also a bit hard to follow.
    – David Reed
    Commented May 20, 2021 at 17:51
  • @anxiousAvocado data model mentioned. Commented May 20, 2021 at 17:54
  • @guljarshaikh it's not easy to understand from what you have mentioned, add more details on how objects are related. It's tough to follow the data model. Commented May 20, 2021 at 17:55
  • <aside> I know I've been reading too much Salesforce documentation, code, etc. when I read the OP's question and see the word "Subject", and the first thing I think is, "I should edit this - they misspelled SObject." </aside>
    – Moonpie
    Commented May 20, 2021 at 17:57

1 Answer 1


This is the flow you should use :

Get all contacts for Chronology -> Loop through each contact -> get all Events AND -> Store each event in a new List -> loop through the LIST OF EVENTS -> create a chronology item record.

enter image description here

  • anxiousAvocado, please do not ask people to select your answer as the correct answer. Commented May 20, 2021 at 21:37
  • @David Cheng do or dont? Because I asked OP to select it as correct answer if it was correct. Not sure I understand. Commented May 20, 2021 at 21:39
  • sorry, do not ask. Commented May 20, 2021 at 21:42
  • Got it . Thanks Commented May 20, 2021 at 21:42
  • anxiousAvocado -- background on etiquette for answers. We appreciate your answers as they help the Community.
    – cropredy
    Commented May 20, 2021 at 22:08

You must log in to answer this question.

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