 Hello friends. I am Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. So in this video, I'm going to cover these points which are listed in front of you. So I will be demonstrating few flow resources. So first is pick list choice set, second is record choice set and third is formula. So before starting, if you want to follow Salesforce training videos, you can search my name Sanjay Gupta on YouTube and you can follow my YouTube channel. So on my YouTube channel, various playlists are available related to Salesforce and other programming languages. So you can follow them. So now coming on to the topic. So to create pick list choice set, we can use pick list choice set resource that is available in flow. Second is record choice set. So it is similar to lookup. So on record creation, we have lookup. So in flow, we can also create that with the help of record choice set and we can use formula to fulfill certain requirements. So first I'm going to demonstrate how we can create pick list choice set to fetch pick list values available in a particular object in pick list field. So moving on to flow. So first I'm going to create one element that is screen. So I'm dragging and dropping this screen. And the screen's label is opportunity details. Right? So here you can fill the description. So this screen, the opportunity details from user. Then we have some options like configure frame, show header footer. So here you can see this is the header and this is footer. So if I uncheck this, so header will be gone. If I uncheck this, footer will be gone. So if you want to keep both of them, you can check these checkboxes as true. Then these are for control navigation, for next, finish, previous and pause. And you can also put pause confirmation message and help. So this screen is created. Now first of all, I will put in the text component. So here you can see I'm good. I'm demonstrating this for opportunity. So with this flow, we are going to create opportunity and to create opportunity. We want to fill opportunity name, close date, stage. And I'm also putting account name to which this opportunity will be associated. Right? So opportunity name is simple. So for this, we just need a text component. So which is here and this will show opportunity name as a label. This will be the API and this is for required because it is required on opportunity creation. So this way I created this opportunity name and I'm clicking on done. So on the screen, you can see this first screen component is available. Right now to fill this stage. So here you can see stage is a pick list. So as I told you, I'm going to demonstrate pick list choice that resource. So now to fetch this stage field from opportunity object so that we can display all the stages on flow screen. So for that purpose, before putting a list on screen, we need to create a resource. And inside this, you can select pick list choice set. So I'm putting its name as API name as stage name, object, opportunity, then data type, pick list or multi select pick list. So you can choose whichever you want and field is stage name. Then it is showing sort orders or sending descending or default order of fields. So whichever you want, you can select as per your requirement. Now I'm clicking on done. So at left hand side, you can see a pick list choice that is created name is stage underscore name. And followed by that you can see screen component is available. That is opportunity name text component and screen is available that is opportunity details. Whatever element or resource you create, you can see all of them under manager tab. So now if I double click on this screen on left hand side, I can search for pick list. I can drag and drop it here. Name stage data type I'm putting as text. So now from here, you need to select the choices. So we created a pick list choice set. So from here, I'm selecting this one, right? So this pick list choice set all this pick list choice set has all the values of stage pick list that is available on opportunity object. So those will be available in this pick list component as well. So now I'm clicking on done. I'm connecting this and I'm saving this after saving. I'm just clicking on the book so that we can see whether these two components first is text component and second is pick list component are properly displayed on screen or not. So when you click on debug these options are available. So you can choose them as per your requirement. Input variable are not available. So input variables are required when we call our flow to process builder or some other thing. So we are not doing this right now. So I'm just clicking on run. So here you can see we can put opportunity name and here we can put a stage and both fields are required. So if I don't put opportunity name, it is automatically saying complete this right. So this is because here we selected this required then. So I hope you understood how we can choose this pick list options from here. And this is because we created this pick list choice set. So I demonstrated you how you can create pick list choice sets so that you can patch all the pick list values. Those are available under an object. So we created opportunity name. We created stage. Now I'm going to create look up for this account. Right. So for this purpose, we need to create record choice set. So I'm closing this again coming to flow builder. So clicking on new resource. Now I'm selecting record choice set. So it will display account list. Object is account. So I'm selecting account. Then you can see various filter options are available. So here we can put conditions. So first is get all records without any condition. Second is conditions are met. So we are choosing second one. Here I'm putting a field. So on my org, one field is available that is active. If it is equals to true. So here I'm choosing global constant or true. So this is a variable which is already available in flow, which you can choose for testing Boolean fields. So if it is true on a particular record active field, then those records will be filtered automatically. After this, you can see sort order. So you can choose as per your requirement. Maximum number of choices that you want to display. You can read this text as well. Enter the maximum number of choices to display. Then to display a choice for every record that meets the filter condition. Leave this field blank. So let's say you want to limit the choice which are filtered. You can enter a value here. If you want to display all records, those are those meet the filter criteria. Then you can leave it blank. Now further we need to configure each choice. So for each record that meets the filter condition, the flow creates a choice using value from the record. Identify which fields to use for each choice label and value. So let's say label I'm choosing as name. So to select a particular account, I'm choosing label as name. Then data type text for this value and for selected account. The value will be ID that we can use for further processing. So let's say you choose a particular account name. So its ID will be automatically available and you can assign that ID to particular field on opportunity. So I'm going to assign this ID to this account name field that is available on opportunity so that account and opportunity can be linked. If you want some other fields which are available on account to have those fields on some variables so that you can use their values for further processing. So you can do so. So right now we just want ID. So we are not going to pull some other fields from here. So I'm clicking on done. So here you can see right now we have two components opportunity and stage. Now I'm going to add one more pick list. Label is data type text. No default value. I'm not putting any default value. Now from here I need to pick the choice. So see here carefully. First option is pick list choice set that we already selected for stage. Second is record choice set that we created right now account list. So I'm choosing this and I'm clicking on done. Now again I have to save this so that we can debug our flow. So I'm clicking on debug clicking on run. So you can see opportunity name we can fill. We can select a particular stage and from here we can select a particular account. So here only those accounts are displayed where active field is having value as true. Right. So this is working as a lookup or you can say we also applied filter. So it is working as a lookup filter. So only selected records related to account will be displayed. And if you choose a particular account, its ID will be available and you can populate that ID into account name that is on opportunity. So we are also going to do that. So I demonstrated you how we can create record choice set. Now third one is formula. So here you can see we have closed date field. So now I'm going to fill this closed date with today's date. Right. So in flow, we can't put today's date directly. So for that purpose, you need to create new resource, which is formula. So I'm putting name as today's date. API name is today date. Data type is date. And here I'm putting a formula today and parenthesis. And I'm clicking on done. After this screen. Now I'm going to put create record element. So it will create opportunity. How many records to create one, then here, here two options are available. How to set the record field. So if you have one record field, then you can choose first option. If you have separate resources and literal values, you can choose second. So we have separate resources. So I'm choosing second option. Here I am choosing object as opportunity because we are going to create opportunity record. So now here we need to map a piece. So first time going to map opportunity name with this. Component that is a count name. So it is screen component. No, this is pick list. Yeah, this one opportunity name. It is linked. Now I'm going to put account ID. So that will be available from this one account name. So whatever account you select, it's ID will be automatically assigned to this account ID. Then next field is stage. So stage will be available. This one stays pick list. So you need to select these screen components. So you need to choose these resources carefully. Then last one is closed date. So for that we created a formula. So here it is. So we are directly assigning today date with the help of formula. And now I'm clicking on done. Connecting these. Now again, I have to save this flow so that we can debug it, whether it is working properly or not. So I'm clicking on debug. So now I'm running it. So, so now I have to fill, I have to fill the name of opportunity. So test opportunity flow. Let's say I'm adding 10. Then stages qualification account name. I'm choosing test account 2021 and I'm clicking on next. So at right hand side, you will see all the values will be available, which we entered. So let's check it one by one. So here you can see opportunity name is available. Then you can see stays pick list value. Then you can see account ID is available here. Then here you can see account ID is assigned created date is today's date. Sorry, close date is today's date. Name is this and stages this and this opportunity is created. Right. And we can directly see this opportunity. So I'm canceling this and here I'm putting that ID. So the opportunity is created. And now we need to test all the values on the detail, whether they are assigned properly or not. So I'm clicking on details. Yeah. So here you can see opportunity name is available. Account name is available. Date is available and stages available. Right. So this way we created this opportunity with the help of pick list choice set record choice set and formula. So I hope, sorry, I hope you understood how we can fetch a pick list or multi pick list field from an object with the help of the pick list choice set. Then second was record choice set. So you understood how we can patch records related to a particular object so that that will work as a lookup filter or lookup and how we can use formula so that we can create some thing that can be assigned directly. So this way I demonstrated you how these things are working in a lightning flow. I hope you understood whatever I demonstrated. If you want to watch more Salesforce training videos, you can search my name Sanjay Pukta on YouTube and you can follow various playlists. Those are available on my YouTube channel. Thank you for watching this video.