Unarguably, It is necessary to learn how to use
Power Automate/ Flow instead of Workflows. To be honest, I am sceptical on replacing all the complex workflows we have been developing for many years. In my mind, I try to figure out different approaches to address different requirements. This is the first post from a series I am planning to illustrate what I found. This shows how to loop through a list of records and perform the same action for each.
In my example, I have only three steps as shown below.
I am triggering for any update happen for Account record. This is simple.
Here I am reading a set of records from an entity called Office using a control called List Records (which I rename as OfficeList). One Account can have multiple Offices. Office entity have a lookup field called Main Account (su_mainaccount). Here you can notice how Account Id from triggering step being passed to map with Main Account, so related Office records would be returned.
Now I am using Apply to each control and most importantly I am passing List of records (type of Office) returned from previous action.
Now, inside the Apply to each control I am creating a Task. In fact, we create task for each record in the list.
Hope this helps.
No comments:
Post a Comment