How can I group the contacts based on account id, I want to show the account name only once and under that I want to keep all related contacts, user shoud be able to select the contacts
That’s not currently possible with the table component. You could potentially show all the contacts from on account on the screen and then click next and loop back to the screen to show a different collection of contacts related to a different account. It’s an interesting challenge.
I'll offer this alternative approach that does not require a loop and has one less DML operation: 1) Create a text formula field on the Contact object with the formula Account.ParentId 2) Add a Get Records element to lookup Contacts where the value contained in your new formula field = recordid 3) Display the output in the data table.
Our gotcha here is that you are limited to the number of relationship references in formulas. So you want to try to not use these up if you don't have to!
Hello. I am following your instructions. On my flow when creating the first get records component 'Get Child Accounts', I am selecting the option 'Choose fields and let Salesforce do the rest'. In your video you select done however, on my screen there is an additional section 'Select Accounts Fields to Store in a Variable'. Field is prepopulated with ID but, I don't know what to select for the next field (search fields). Thank you.
You can choose Automatically Store the Fields and Salesforce will determine which fields to get based on what you've used later in the automation. If you select "Choose fields and let Salesforce do the rest" then you'll need to select which fields you want to use later in the flow, probably first name, last name, phone, etc. Whatever you want to show later.
This is wonderful, thank you! Question for you regarding a few more fields to include. How can i best incorporate an account owner name and a contact created date into the data table? It would be helpful to show these details so users know who the owner is internally and also how recent of a contact the contact is
Hey there! When you're at the configure columns step, you can add any fields you'd like from that object. You might find, however, that lookup fields like Account or Owner just return ID values and not the name of the Account or Owner. This is a limitation of the component. You can get around it by creating a formula field on the object and referencing that related record's field. Then just use that new formula field as a table column instead of the lookup. Hope that helps!
Hello I found this very useful! Thanks so much. I'd like to take this further and use it on the Quote Line Editor (yes, you can create an custom action to use on the QLE to call a flow). I am trying to follow your tutorial but for this use case: on the quote line editor get the Account from the Quote and loop through all those accounts to find the children account that have a box marked for Tier 1 as true. This way we our users can see a full list of the Accounts in the hierarchy (it doesn't necessarily have to include the parent account itself) and select all/some/or none to add as quote lines. The custom action itself I have a handle on, just need guidance on the flow. If you can help, would be great, otherwise I look forward to more of your tutorials.
Hi Denise, That's an interesting use case. I'm not sure I'm completely understand. It sounds to me that you 'd like to Get all children of an account including children of children, etc. Is that right? That can be a little tricky and I would first recommend creating a formula field that populates the ultimate parent for every account. That will allow you to get all Accounts that are somewhere underneath the Account you start with. Here is a helpful link: trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A7SLcSAN
@@Rotive schools in the district, so the Opp is related to the district account, but the customers, and our finance and product team need to see which schools the district is purchasing for so we can provision correctly. Now some districts can have hundreds of schools so when users create a quote they have to add a line for each school which as you can imagine can take them a very long time (we do help out with larger schools by uploading them en masse). I've recently found Custom Actions in CPQ that allow you to do a popup and it can call a URL, since flows do have a URL in their properties you can use a flow. So, I was thinking a screen flow with a table could possibly work. They click the button and get a list of all the schools under the district of the Opp that are tier 1 and just be able to select the ones they want, save and it loads the lines with schools for them in QLE. This may be far fetched but it is a big point of contention with our reps so I am just thinking of ways to alleviate that hassle.
Hi Brian, Thanks for all your videos. Appreciate your content. I was wondering if there is a way to create a full Account Hierarchy using data table, so it can show all the parents, children, siblings, uncles and aunts :) (similar to what we see in hierarchy column). Trying to create a filtered hierarchy list for prospect vs customer. Any guidance is appreciated as well!
I don't know of a way to do that. One of the challenges is knowing how many levels to Get. Even if you do get records from many levels, there won't be an easy way to display their relationship in Flow, though there may be a component out there that could help. I'd check UnofficialSF first to see if there is something that might fit your use case.
You can! They added a search bar to the Data Table component. Select that component on your screen and you should see an option on the right to add a search bar.
Yes it can. It's trickier though because you'll first need to create a sophisticated formula field on the Account that displays the ultimate parent account. Then you can run a Get to return all child accounts and child child accounts, etc. Check out this article on the formula: www.passagetechnology.com/lookup-helper-use-cases/ultimate-parent-account
Hello @ShockingRecords, Have you find a solution for this task. I'm trying to dispal SVs and opportunities from child accounts on the parent account layout and didn't find a useful way.
user selected account, it is not fetching the new account's related contacts instead it's fetching previous account's related contacts from screen component. Any idea how this scenario can be achieved?
It's hard to know without looking at the Flow. You should be able to have the user select and account on one screen and then progress to a Get that references the account they selected. If you want them to be able to do this multiple times, you'll want to reconnect the flow back to the screen where they first select the account. The rest should be the same.
Hi Brian, i work as an It professional and seriously need help to create a custom Hierarchy to display the parent record and its child records using a flow. do you have any refernce here
Hey there. Thanks for the comment. How many levels of this hierarchy do you need? Do you have to use Flow for this? Could you help me understand the use case?
@@Rotive Thanks for the response, i actually tried and was able to figure the business process here. and could create the relationship. I really appreciate your response.
Hello Brian. Im suffering to find a solution to my requirement and I came accross your video although Im your follower. Basically I need to dispaly opportunities and sales visits of child accounts on the ultimate parent account layout knowing that we have 5 hierarchies level. I tried my best to create a screen flow for this but failed every time. Can you give a hand please.
Hey Ben, this is tough. First thing I would do is follow this formula to identify the ultimate parent on each account: trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A7SLcSAN That will let you then Get all the child accounts (at every level) so you can count up the number of sales visits and opportunities to then update the ultimate parent. I probably wouldn't do this as a screen flow. I would instead use a record-triggered flow to run the calculation whenever the Sales Visits or Opportunities count field on an account was changed. I hope that helps. Let me know if you still have questions.
I did something similar like this for my clients but I use the data table component from unofficial Salesforce. It looks way better cause the records in the table are linked
Hey HH Lin. I love that component. I've used it quite a bit too. Thanks for mentioning it here! unofficialsf.com/datatable-lightning-web-component-for-flow-screens-2/
This was exactly what I was searching for. Thank you!
Fantastic! Glad it was helpful.
How can I group the contacts based on account id, I want to show the account name only once and under that I want to keep all related contacts, user shoud be able to select the contacts
That’s not currently possible with the table component. You could potentially show all the contacts from on account on the screen and then click next and loop back to the screen to show a different collection of contacts related to a different account. It’s an interesting challenge.
Amazing!! Thank you for sharing and keep sharing flows videos. Very helpful
Glad you found it helpful! More to come.
I'll offer this alternative approach that does not require a loop and has one less DML operation:
1) Create a text formula field on the Contact object with the formula Account.ParentId
2) Add a Get Records element to lookup Contacts where the value contained in your new formula field = recordid
3) Display the output in the data table.
Hi Stacey, Great solution. It definitely simplifies the Flow. Thank you for suggesting it!
Our gotcha here is that you are limited to the number of relationship references in formulas. So you want to try to not use these up if you don't have to!
The table component is pretty new but I'm finding lots of uses for it.
Hello. I am following your instructions. On my flow when creating the first get records component 'Get Child Accounts', I am selecting the option 'Choose fields and let Salesforce do the rest'. In your video you select done however, on my screen there is an additional section 'Select Accounts Fields to Store in a Variable'. Field is prepopulated with ID but, I don't know what to select for the next field (search fields). Thank you.
You can choose Automatically Store the Fields and Salesforce will determine which fields to get based on what you've used later in the automation. If you select "Choose fields and let Salesforce do the rest" then you'll need to select which fields you want to use later in the flow, probably first name, last name, phone, etc. Whatever you want to show later.
This is wonderful, thank you! Question for you regarding a few more fields to include. How can i best incorporate an account owner name and a contact created date into the data table? It would be helpful to show these details so users know who the owner is internally and also how recent of a contact the contact is
Hey there!
When you're at the configure columns step, you can add any fields you'd like from that object.
You might find, however, that lookup fields like Account or Owner just return ID values and not the name of the Account or Owner. This is a limitation of the component.
You can get around it by creating a formula field on the object and referencing that related record's field. Then just use that new formula field as a table column instead of the lookup.
Hope that helps!
@@Rotive Awesome, this did the trick!
Hello I found this very useful! Thanks so much. I'd like to take this further and use it on the Quote Line Editor (yes, you can create an custom action to use on the QLE to call a flow). I am trying to follow your tutorial but for this use case: on the quote line editor get the Account from the Quote and loop through all those accounts to find the children account that have a box marked for Tier 1 as true. This way we our users can see a full list of the Accounts in the hierarchy (it doesn't necessarily have to include the parent account itself) and select all/some/or none to add as quote lines. The custom action itself I have a handle on, just need guidance on the flow. If you can help, would be great, otherwise I look forward to more of your tutorials.
Hi Denise, That's an interesting use case. I'm not sure I'm completely understand. It sounds to me that you 'd like to Get all children of an account including children of children, etc. Is that right?
That can be a little tricky and I would first recommend creating a formula field that populates the ultimate parent for every account. That will allow you to get all Accounts that are somewhere underneath the Account you start with. Here is a helpful link: trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A7SLcSAN
@@Rotive schools in the district, so the Opp is related to the district account, but the customers, and our finance and product team need to see which schools the district is purchasing for so we can provision correctly. Now some districts can have hundreds of schools so when users create a quote they have to add a line for each school which as you can imagine can take them a very long time (we do help out with larger schools by uploading them en masse). I've recently found Custom Actions in CPQ that allow you to do a popup and it can call a URL, since flows do have a URL in their properties you can use a flow. So, I was thinking a screen flow with a table could possibly work. They click the button and get a list of all the schools under the district of the Opp that are tier 1 and just be able to select the ones they want, save and it loads the lines with schools for them in QLE. This may be far fetched but it is a big point of contention with our reps so I am just thinking of ways to alleviate that hassle.
Hi Brian, Thanks for all your videos. Appreciate your content. I was wondering if there is a way to create a full Account Hierarchy using data table, so it can show all the parents, children, siblings, uncles and aunts :) (similar to what we see in hierarchy column). Trying to create a filtered hierarchy list for prospect vs customer. Any guidance is appreciated as well!
I don't know of a way to do that. One of the challenges is knowing how many levels to Get. Even if you do get records from many levels, there won't be an easy way to display their relationship in Flow, though there may be a component out there that could help. I'd check UnofficialSF first to see if there is something that might fit your use case.
If I wanted to users to be able to search the table is there a search function? Same question for sorting
You can! They added a search bar to the Data Table component. Select that component on your screen and you should see an option on the right to add a search bar.
Can the same principle be applied to show on the top account all opportunities from the account hiararchy?
Yes it can. It's trickier though because you'll first need to create a sophisticated formula field on the Account that displays the ultimate parent account. Then you can run a Get to return all child accounts and child child accounts, etc. Check out this article on the formula: www.passagetechnology.com/lookup-helper-use-cases/ultimate-parent-account
hi @@Rotive and thank you for your reply and guide! let me check and tweak around! :) best, daniel
Hello @ShockingRecords,
Have you find a solution for this task.
I'm trying to dispal SVs and opportunities from child accounts on the parent account layout and didn't find a useful way.
user selected account, it is not fetching the new account's related contacts instead it's fetching previous account's related contacts from screen component. Any idea how this scenario can be achieved?
It's hard to know without looking at the Flow. You should be able to have the user select and account on one screen and then progress to a Get that references the account they selected. If you want them to be able to do this multiple times, you'll want to reconnect the flow back to the screen where they first select the account. The rest should be the same.
Hi Brian, i work as an It professional and seriously need help to create a custom Hierarchy to display the parent record and its child records using a flow. do you have any refernce here
Hey there. Thanks for the comment. How many levels of this hierarchy do you need? Do you have to use Flow for this? Could you help me understand the use case?
@@Rotive Thanks for the response, i actually tried and was able to figure the business process here. and could create the relationship.
I really appreciate your response.
Hello Brian.
Im suffering to find a solution to my requirement and I came accross your video although Im your follower.
Basically I need to dispaly opportunities and sales visits of child accounts on the ultimate parent account layout knowing that we have 5 hierarchies level. I tried my best to create a screen flow for this but failed every time.
Can you give a hand please.
Hey Ben, this is tough. First thing I would do is follow this formula to identify the ultimate parent on each account: trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A7SLcSAN
That will let you then Get all the child accounts (at every level) so you can count up the number of sales visits and opportunities to then update the ultimate parent. I probably wouldn't do this as a screen flow. I would instead use a record-triggered flow to run the calculation whenever the Sales Visits or Opportunities count field on an account was changed. I hope that helps. Let me know if you still have questions.
I did something similar like this for my clients but I use the data table component from unofficial Salesforce. It looks way better cause the records in the table are linked
Hey HH Lin. I love that component. I've used it quite a bit too. Thanks for mentioning it here!
unofficialsf.com/datatable-lightning-web-component-for-flow-screens-2/