Skip to main content

Hello, I have been working with a flow that creates 12 records according to a category, each record related to a different month, all of them right away.

Each record has a picklist to identify to which month belongs. I have already created the flow to accomplish the previous criteria. However, the problem I'm facing right now is more about technical debt, and this is because I have a 'Create Record' element for each month, and it is not only one category. There are 15 categories that are equal to 165 records. Moreover, I have created the 165 records manually inside the flow.

And I have done it like this because I cannot find a way to make the value of the month dynamic. When I create a record all the fields that I need to fill are dynamic, but the month is not. Therefore, that leads me to the need to create them manually.

I have thought of a workaround to create a collection with all the months of the year, and then inside of a loop, iterating it to create the record, and once it is created, change its value to the next month and so on...

But if that works, it will only solve it for the first category because then I will need to create other loops for the remaining categories, and I will end up with an enormous number of loops in my flow that could be worse than what I already got.

In addition, I'm just starting in the SF ecosystem. I do not have enough experience.

If you have any workaround or if what I have done is not considered a bad practice.

Please, let me know; I would appreciate it.
1 respuesta
  1. 26 dic 2022, 3:00
    Hi,

    Can you share your exact requirement so can provide the ideas of the flow. I understood that you have to create the record for every month abu you mentioned for different categories. Can you specify what is that about.

    Thanks,