Multi-Object Distribution Part Links
We need two objects for this project the first Distribution Container is what it sounds like and is the container for users in that distribution queue. Distribution users are child records of the Distribution containers which hold the individual user.
Distribution Container Setup
Action | Name | Type |
Create Object | Distribution Container | |
Name Field | Name | Text Input |
Create Field | Active | Checkbox |
Create Field | Number of Times Ran | Number(18,0) |
Create Field | Number Of Users | Rollup(Distribution users) |
Create Field | Next Assignment | Number(18,0) |
We will use the name field to identify the container used in the setup flow and user management. Active will need to be ticked for it to run the distribution else it will pass through with no value. Number of Time Ran this will help see how many times this container has been updated. The number of users will act as a counter to be able to reset the count and the Next assignment will be the next number of the user to assign.
Distribution User Setup
Action | Name | Type |
Create Object | Distribution User | |
Name Field | Name | DU-{0000} |
Create Field | Distribution Container | Parent(Distrubtion Container) |
Create Field | Active | Checkbox |
Create Field | Number | Number(18,0) |
Create Field | User | Lookup(User) |
We will use an auto number for this as you will have multiple Distribution Users of the same user across multiple distribution containers. The container is the parent Distribution Container. Active will allow you to set individual users to inactive and active to handle absences. The number will be used to hold the number of the individual record in the queue. The user is a lookup to the user object.
Lightning Record Page
Lastly, in part 1 of this project, we will build a lightning record page for the Distribution Container. Containing the related detail and related distribution user. Editing the page layout for the related list containing User, Number, and Active. The end result should look like the image below.
In the example distribution container, I have manually created records and would recommend you do too to make sure you have set up the fields correctly and laid them out. If you are ready to jump into Part 2 – Distribution Flow.