How To: Screen Flow to Update Multiple Records (It's Flow Easy!)
Вставка
- Опубліковано 26 лип 2024
- Hey Salesforce Friends! 👋
🗞️ Sign-up to the Part-Time Salesforce Academy newsletter here: www.adamfoyston.com/newsletter
LINKS
Signup to my Newsletter!: newsletter.adamfoyston.com/
Start up you're own Trailhead account: trailhead.salesforce.com/
FREE Salesforce Developer Org: developer.salesforce.com/signup
Trailhead Career Paths: trailhead.salesforce.com/care...
Mason Frank: www.masonfrank.com/
Salesforce Ben: www.salesforceben.com/
Timecodes
0:00 - Intro & Overview
1:15 - Flow Use Case
3:03 - Create New Screen Flow
4:11 - Create Get Records Element
10:15 - Create Decision Element
14:15 - Create Screen Element for 'No Records Found'
16:43 - Create Screen Element to Select Multiple Records
23:08 - Create an End to a Path
24:20 - Create Loop Element
25:56 - Create Decision Element
29:36 - Create Assignment to Set Values
33:21 - Create Assignment to Add Record to Update List
36:45 - Create Update Records Element
37:51 - Debug the Flow
40:20 - Create Custom Button to Launch Flow
46:38 - Learn More/Outro
If you found this video useful please subscribe for more videos like this every week!
Also, let me know if you have any questions about Salesforce and/or there are any other videos you'd think would be good to make.
May the Salesforce be with you! x
Connect with me on LinkedIn: / adam-foyston-32148954
🗞️ Sign-up to the Part-Time Salesforce Academy newsletter here: www.adamfoyston.com/newsletter - Навчання та стиль
@AdamFoyston - You are a Legend! Thank you. This demo has really help me.
I've had a few requests for more Flow tutorials so hope everyone finds this useful!
This was great thanks, Adam! I do have a request for a flow tutorial. I am trying to create Assets from Opportunity Products. However, I only want to create them if they're not already on the Account. If they're already there, I just want to update date information on them from the Opportunity. Slowly learning Flows, and your videos have been tremendously helpful!
Your videos have been rockstar level! My use case is form in line with Dynamic fields. So in screeen 1 someone uses a Lookup component to find an account. Then on screen 2 it auto populate certain fields from the Account object creating a new record. So for example, an onboarding application form. They find their account and repetitive info populates without them complete the info we have only needing to answer certain questions.
This was very awesome! You got me over some of the obstacles I was just not picking up from Trailhead for some reason!
Awesome and very well explained. Thanks Adam
This video was amazing, it helped me troubleshoot so many problems I was having implementing this exact action
You are great at teaching. Thank you very much! I loved the real time walk through of setting up this flow.
You are so welcome! Cheers Jon
Awesome. found your tutorial very useful.
This was excellent, Adam - stumbled across this video as was looking for a similar way to handle updates from Data Tables in a screen flow but this method worked a treat - many thanks
Awesome - glad it was helpful. :)
Adam. Thanks for this. I'm currently doing a project and funny enough working on screenflows today. Well trying to. This video hopefully should help me where I should be going.
Thanks again. Have subbed for more informative Salesforce tips!
Fantastic! Go for it! The best way to learn is to just start trying it out (after knowing the basics). Check out a 'Flow Basics' video I did if struggling with that, but sounds like you're already more advanced. Let me know if there is a specific use case and maybe can help further. Cheers, Adam
Great tutorial, thanks for keeping it interesting!
Glad you enjoyed it!
Dear Adam, Thank you so much for this tutorial. This has really helped me.
Glad it helped!
Very useful, thanks Adam!
Thanks!
Thank You!
You're welcome!
Hi Adam! Great videos. Thank you! Do you know how to Enable Multiple Time Zone Selection on calendar? Thank you!
Your channel is very valuable for someone trying to get a handle on process flows, thanks for posting them. I have request for a flow tutorial also (unless you have it already and I missed it). I'm trying to build a flow that is triggered when someone creates or updates a task and selects MULTIPLE contacts. I have an old script that I built in Process Builder years ago that writes that task to a field in the account and the first contact record along with the task date. BUT, if someone selects multiple contacts in the task, it only updates the first contact. I migrated that to Flow Builder but can't figure out how to modify it to accommodate multiple contacts.
Great instructional content, and very helpful for my use case. However, there is NO need to select "Available for input" and "Available for output" on all these variables, nor include Account.Id or add these variable input parameters to the URL.... All you need to do is create a text variable named exactly recordId (case-sensitive) in any flow, and that will receive the record ID from any input sent via user input, screen flow, action button, etc. from the Salesforce record ID being clicked (source). It seems many Salesforce admins (even more advanced and knowledgeable than I) think they should just click these 2 options, when that just creates unnecessary overhead and confusion (allocating memory/resources/input and output fields prompted when debugging or executing, that will never be needed or used).
The ONLY place you need to click "Available for input" is on the recordId text variable you create inside the flow. Unless you are calling this as a subflow (accepting variables from a parent flow, or returning values from this flow back to the parent flow that called it) there is no need to check these options on any variables except recordId.
Love this feedback Ken! thanks for contributing and will help many others (including myself) on this. I discovered the recordId bit soon after. Documentation on SF isn't great. Thanks again!
Fully enjoy your vids, mate. Some feedback for this one, would love a little more zoom on your screen to make it easier to read. Thanks
Noted! Sometimes I forget to switch the res on my screen form ultrawide to normal 1080, hence why this was a bit zoomed out. Sorry. Hopefully, you still got some value from it. Thanks for the comments, much appreciated.
Thank you for this helpful tutorial! One thing I do not understand is how to show more fields in the Checkbox list so that users have enough information to actually know which records to select. I need more than just the record ID to display for the user. Can you use a data table somehow? If so I haven't figured it out!
To all who are getting this error , do this : First assignment , set CurrentLoopITems.status equals used and then in second assignment , create the new variable and set it to CurrentLoopITems , that´s it , no more errors.
Yes, enjoyed! Thanks for your excellent explanation. Q: can you add more fields on that checkbox group element so that users can recognize the records they want ot select easier?
Great suggestion! So I did another video "Screen Flow Tables" to check out which covers that. BUT first check out my latest Winter 23 video that tells you the 'data table' element is now native (so you don't need to install a 3rd party version anymore). Best of luck - Adam
Hi Adem, thank you for your all videous about flow, they are really helpful. Can you show us a flow that when ever a field update it affects the security. F.e. whenever an opportunity closed won, other opportunity fields are updated read only. Can we do that?
Great question. To be honest I don't know, but I suspect you can't (yet). However, another way to achieve the requirement of making fields read only would be:
1) Use the Flow to change the record type of the record to one with a layout assigned that has the fields read only.
OR
2) Use the new Dynamic Actions in the Lightning Layout to use conditional formatting/FLS.
Check this video out for 2) - hope it helps: ua-cam.com/video/7M4dOWPPneg/v-deo.html (skip to 9mins)
How can i set a maximum limit of records
Thanks Adam, this is really helpful. Question: if I am already giving the filter for for unused ones in "get records" elements, then do I need to give the filter in "select vouchers" screen? I think it should only give you unused ones?
Hi there, yes good point. You don't need to if you use the dataset derived from the Get Records element. If you're running a new query (not referencing the get records collection variable/output) then you do need to do it again. Thanks for the comments :)
Thanks Adam, very helpful information, i have Query on screennflow, is it possbile to show up multi select picklist selected vlaue in screenflow as picklist choice from Opportunity owner record ?
Hi there, hmmm so you mean a field value from the USer Record (derrived from the Opportunity Owner). I don't think so unless the screen flow is looking at the User Profile record. I could be wrong though. You might be able to reference lookup fields but don't think you can from memory. What are you trying to do?
For some reason I cannot get the current record Id in the get current loop. Am I missing something? All I'm seeing is Master Record ID.
Hey Adam. Why did you create a lookup field on the voucher record to hold the related account ID instead of just using the SFDC native ‘recordId’ variable which automatically passes the record ID of the record in which you initiate the flow from?
Hi Josh, Great point and something I now do. It only occurred to me after this video that this functionality was always there. I've highlighted it in my 'Top Ten Flow Tips' video. Thanks for highlighting here for others to see too :)
Hey Adam. With a Lookup Component in Flow say Account, when you choose the Account can it auto populate the address, phone, email fields in a Screen Flow Form? Would love to see a video on that or connect and I would love to learn.
Hi there,
Not too sure the use case exactly that you're describing. Using your example, if you click on an Account,.....then what. Which address, phone, email fields are auto-populated on what object. The screen flow would ideally pass those values to an object record to save, so good to know what it is you're trying to do. It might be that you don't need a flow and simply need to do a URL hack. See this video: ua-cam.com/video/vtwH-n3gTlg/v-deo.html
@@AdamFoyston Thank you! You are a rockstar my friend!
Adam, thanks for this video. Question - My window seems to display in Classic. Is there a way for it to display in Ligtning?
I just encountered this the other day. Right now your org is set up to use the "Classic Runtime Experience". To update to Lightning, go to Setup > Process Automation Settings > Select "Enable Lightning Runtime for Flows" and save. That will update the appearance.
Holly! Thank you for engaging and helping to answer the question! How much do I owe you? :)
@@holly8783 Thanks, Holly! I really appreciate it :)
Watched this 100 times and made it 100 times, doesnt work for me get the same error over and over again. "Error Occurred: If you use a record variable to update or delete records, the ID value in the variable must be populated."
Hi there,
When you run the debug, what attribute is it saying need populating?
Hi Adam, Thanks for this Multiple record update flow presentation. I wanted to use this for our use case, where we want to update the open opportunities to check whether they can be closed. But I am getting a 'Limit Exceed: Your or your organization has exceeded the maximum limit for this feature' error. What is your suggestion to override this problem. Appreciate your expert advise. Thanks
Hi there, what is you specific use case? What are you trying to check with your Opps/trying to change? It could be that you're trying to assess a huge amount of data (especially if all opportunities)
@@AdamFoyston Thank you for responding to my question. What I am trying to do is get list of all open Opportunities, not updated within the last 6 months, and then pick the obvious one's from the list that can be updated as closed lost. Appreciate your recommendations. Thanks
with reference to @21:04 I am wondering if for my case one field display such as ID is enough to make the user take the decision to select the record. In my case I am using radial button as I want user to select only one record. How can i display 4-5 fields in the list view screen as oppose to your screen? Thank you.
Hi - great question. There is an easy answer and a cleverer answer....the easy one is to just concatenate the field values you want to display into one field and string of text. That way they can see what they need. However, that's all there is out of the box. To be clever you can build a lightning component that queries and displays the fields in a table format that you can add to the screen. Like this article suggests...hope it helps: pexlify.com/blog/table-component-for-flows-in-salesforce-lightning-part-1
Hi Adam, I'm getting the following error on the update step: "Error Occurred: If you use a record variable to update or delete records, the ID value in the variable must be populated." I've been through the video about 10 times and can't seem to pinpoint what I'm missing. Obviously you don't have any detail of the flow I'm working on, but figured I'd reach out and see if that error message gave you any general thoughts as to things I should check. In the debug I noticed that when I'm assigning the single contact to the table of contacts to be updated it says {!CUpdateList} = "[Contact (No ID)]". Any thoughts or help would be greatly appreciated.
Hi, I am getting the same error. Were you able to resolve it ? Thank you
Same with me.