Skip to main content
Tabitha Gibbens (Addition FI) a posé une question dans #Flow

I've been struggling for about a week now to figure out how to design something and I'm starting to think it's impossible.

 

Here's my use case:

We're tracking projects using three custom objects - Project, Project Member, and Project Assignment. The project record has all specific project details. The member record is something like a user page for projects where it checks off roles people are trained in and lists all projects a department or an individual is currently on through the project assignment related list. Project assignment is a bridge between the objects and a new one is created for every department/person and project that's created to provide lists of members on projects with that specific project role and lists of projects on members.

 

I need to collect information to start a project record and pull the member data in so that people can select the departments and people who will be working on the project from the approved list of users. I then need to take each project member record selected and use that ID when creating a project assignment record.

 

So...

 

I start with a Get Departments to pull all records on the Project Member object that are listed as being a department resource.

Creating Related Record on Multiple Records Flow Loop

 

I have three screens where I collect information. The first and third screens collects information about the project and will be used to create a single new project record. The second screen references the Get Departments in two data tables to identify involved active departments and those that will be impacted. The data tables are multi-select. I then need to take those individual record IDs for each department and create a related record on each of the selected records of the Project Assignment type.

Flow02-StepsScreenshot.png

 

I figure at this point what needs to happen is I create a loop using the Active department data table selected rows.Flow03-LoopSetup.png

 

But those records are using the Project Member object, and the related record I need to create is Project Assignment records. Every project assignment needs to be created brand new and use the looping active departments IDs in a lookup field between Project Assignment and Project Member. It also needs to include a non-changing lookup on each one with the Project record ID to link Project and Project Assignment.

 

Ultimately this is what I think I'm aiming to achieve.Total Flow Notes.png

 

I really need some advice on how to structure this so I don't use a ridiculous number of get records and create records and update records and break Salesforce.

 

Thanks,

Tabitha

 

#Flow  #Automation

6 réponses
  1. 8 nov. 2023, 19:55

    @Tabitha Gibbens,

    Hi Tabitha, at a glance, the first assignment element is putting you off track. In the Flow, the left side of the operator is always the side that will get the value, and the right side is what the value will be (in the case of an 'equals' operator). With how you have it configured, LOOPVAR_ProjectMemberId will always be null.

    My suggestion would be to eliminate the first assignment element entirely, and in the second assignment element, instead of using your project member id var you set up, to use the current item from loop project member id variable instead. Outside of that everything else looks good!

0/9000