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
Eric Delahay 14Eric Delahay 14 

flow works fine in debug mode, but stops after first record when triggered by a process

Hi,
I have found similar questions but didn't find a definitive answer or "known issue".
I have an autolaunched flow that is triggered by a process. The process fires when a new Calendar Event record is created. For every Contact that was added to the Name field in the Event record, the flow should create a record for the custom object "Event participation". Salesforce has put those invited Contacts together in the WhoRelationId field of the (Calendar) Event record. So that field can contain more than 1 Contact record id. Maybe some Salesforce guy was feeling lucky the day he made that functionality....
Anyway; when I run the Flow in Debug mode, I add the Event id as input and it all works fine. For each Contact record, an "Event Participation" record is created. When I let the Process do its work, however, only the first Contact record results in an Event Participation record. I'm just a functional person ("clicks, no code") myself, but I had a developer take a look at this. He can't figure this out. The loop would be the prime suspect, but that seems to be OK. I added a screenhot of the flow.
Any ideas would be very welcome.
The alternative would be to either tell the business user that we can't make this work (not on my watch....) or rebuild the (Calendar) Event object. Phew.....

Thanks.
Eric DelahayUser-added image
 
nitin Sharma 401nitin Sharma 401
Your use case is when somebody crates an event on the calendar with several contacts on it then  their information should be stored in the custom object named event participation.Correct? if so then it is possble and it should work.I know it works and u must have been doing something wrong somwhere.....I  can see u have seven nodes when u should be having only 6 nodes...I understand therr are differen ways of doing it so u might me having more nodes and still correct about it still try to get rid of unnecessary information.However,this can be solved through trigger easily and  it can be done in 10 minutes...U do not need  node named Get event as you are already passing event id from the process builder so youl should be directly calling EventwhoRelation object.

Secondly,have u tried runing it thorugh the process builder without specifying any criteria.....if not try that  as I am suspecting that if its working in  flow builder while debugging it without any problem then criiteria in the process builder might be a problem....I will let you know today after giving a shot in my org and am 99%sure it works
Eric Delahay 14Eric Delahay 14
Hi Nitin, Thanks very much! Later this week, I will be able to talk to our developer about this. I will let you know how that works out. Have a nice day! Eric
Alex WandersAlex Wanders
Hi Nitin, I duscussed this with our developer. We tried simplifying the flow and removing the GetEvent thing, but that didn't help. Meanwhile, we worked around this thing by building a custom object that allows us to do what we want. So, for now, we will not dive into this problem any deeper.
Many thanks for your input!
Have a nice day.
Eric Delahay