 Hello friends, I'm Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. So in this video, I'm going to cover these three points. So first is how to create screen flow. So I'm going to demo you how we can create screen flow in Salesforce. Second point, as per second point, I'm going to take example to create opportunity with the help of screen flow. And then I will show you how to debug a flow in Salesforce. 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 here, if you go to playlist, so various playlists are available related to different topics in Salesforce. So you can learn Salesforce from there. Now coming on to the topic. So if you want to create a flow or you want to see existing flow. So you need to click on setup and then you can search flow in pipeline. So this flow option will be available under process automation. And right inside you can see all existing flows that you have created will be displayed. And if you want to create new flow, you can click on new flow button. So a new tab will be opened. And here you need to select flow type. So here you can see two types are available screen flow and auto launch flow. So in this video, I'm going to demonstrate screen flow only. In my another videos in this playlist that is related to flow builder in Salesforce, you will see how we can create auto launch flow, right? So now I'm going to create screen flow. So this is the flow builder. So where we can create a flow. So at left hand side, you can see elements and manager two options are available. So if we see elements, so here a screen action subflow, these three interaction elements are available for logic building. We have assignment decision and loops. And for data, we have create record update record get record and delete record, right? So these options are available. Then if you go to manager, so from here, we can create new resources in terms of variables, constants, formula, text template, choice, record, choice set, pick list, choice set and states. So these are certain options that we that we can use by creating flow. So as per our example, we need to create opportunity with the help of screen flow. So let me take you to opportunity tab first so that we can see which fields are required to create opportunity so that we can use them in screen flow. So here you can see opportunity name, close date and stays three are required. And we can choose any other as well, which we want to fill through screen flow. So now moving here. So friends, whenever you want to create screen flow, you first need to drag and drop this screen. So here new screen is available. At right hand side, you need to put the label for screen. So, so to fill the name here, let's say I'm typing screen underscore opportunity details one, right? Then here you can see we can fill description API name is automatically populated. If you want to modify this you can do then you can fill the description as per the requirement. Then configure frame. If you want to show header footer, then you can check these two options. Then we have control navigations for this screen. If you want our next or finished previous pause, these options to be available. You can check all these options. Otherwise you can check for pause. If pause is available only if let users pause flow is enabled in your ox process automation setting. So if this setting is enabled then only this pause will work. So this I'm also going to demonstrate in my another video. So right now we are not going to focus on this. Then here you can put a pause confirmation message. So here you can fill that displayed when a user pauses the flow. Don't forget to tell users how to resume the fight. Then this is for provide help. So you can provide help text for this screen flow. Right. So now we have provided screen properties. Now from here we can put certain components like which are available at left hand side under screen components category. So we need to put opportunity name close date and stage. Right. So for opportunity name, I'm going to choose text. So I'm dragging and dropping it here. So it will read opportunity name from the user. So label is opportunity name. It should be required. If you want to put any default value that you can do that, then set component visibility. You can choose these as per your requirement, validate input. So you can put error message for validating. And if you want to put any formula, you can put it here. And this is for help text. So here we can put an opportunity name. Right. So here you can see the help text is available here. So this way, this first component we created. Now after this, we need to have close date and stage. So for date, you can use this and we can drag and drop. So label close date. It should be required. Then you can set the default value and all options, which I explained in while creating opportunity name component. So you can see them as well. Right. And at bottom, you can see pause previous finish three buttons are available because these are available on the screen. So this will be created our first screen and I'm going to save this. So I clicked on them. So it is now created. Now I'm going to create one more screen. Again, I have to put names. So I'm mentioning screen. Opportunity details too. Right. So right now I'm taking this dummy labels. So in your project, your lead will be providing you the labels and all. So as for that, you can fill the labels, API name, descriptions as per the requirement. So these options I already explained while creating screen one. So now we are creating screen two. So we put opportunity name and close date already. Now we need to put stage. Right. So stage is a pick list and which is having several options and these options are available in the opportunity object. Right. Under this stage feed. So now we need to pull those values and we need to put them on this screen. So before creating this screen, let me create a variable. So now you will know how we can create new resources in terms of variables, constants, formula, text template, choice, record choice set, pick list choice set and stays. So right now I'm going to choose this pick list choice set because we need to show options for the stage and that is in terms of pick list. So I'm choosing this option. Now I have to provide API name. So I'm mentioning stage name. Then here you can put description and you need to choose the object from where you want to create this pick list. So I choose opportunity. Then here data type, whether it is pick list or multi select pick list. So I'm choosing pick list. Then I need to choose the field. So I choose stage name. So all the values, all the pick list values that are available in the stage name field will be available under this stage underscore name. Pick list choice set. Right. So here you can choose sort order. So you can choose ascending, descending or default order of a field. So I'm using default order. And I'm clicking on that. Right. So here you can see pick list choice set is available. And all the resources that we are going we are creating all displayed here like screen components we created to close data and opportunity name. We created only one screen. So that's why it is available here. So you can also manage your resources from here. So now we are going to create one more screen. Now, here you can see pick list option is available and dragging and dropping it. So let me first fill the properties of this screen. So I'm filling those details. If I click on this pick list components, so it's details I have to fill. For stage name. I can just put stays because here. Click on me. So here only stages available. So that's why I'm putting stays only data type text. Now here from here I can choose that choice list that I created. So here it is available. So all the values which are available in this will be automatically available in this pick list component. Right. Now I'm clicking on that so that it will be created. So we created two screens right now from here you can connect these screens like this so that you can define the order of execution of this flow. So from start control will be transferred to the screen one, which will read certain values then transfer will goes to screen two, which read certain values. Now after reading all these values we want to create opportunity record right. So from here from this data category you can choose this create records. So here I will label as create opportunity. Here you can fill the description as per your requirement. Then it is asking how many records to create. So right now we are creating one record how to set the record values. So use all values from a record use separate resources and literal values. So right now we have separate resources right. So we are going to choose them. If you have only single record choice. So you can choose this also. Now I'm selecting object. So I choose opportunity. So create a record of this object. So here various options are available. Now we need to map the fields. So set field values for the opportunity. So first time choosing name. So this is for opportunity name. So here we created opportunity name screen component. So I'm putting that and I'm adding close date one more. That is stage. So stage name. So now see here carefully. One is pick list choice set and one is screen component. So we need to put screen component because on screen we are going to select a particular value. So this component is having the real value that we want to assign. So choose resources carefully. Then these three will be mapped. Now I'm going to click on done and joining this as well. So this way I created this flow. Now at top right corner you can see save button is available. So here I'm providing flow level as create a part hit record. This is API then description if you want to fill. Then here some advanced options are available. So right now I'm not explaining these because these are not related to this demonstration. I'm just saving these. So this way flow is created. It is ready for activation. Now I'm not activating it because we are not going to use this flow in any component of Salesforce. So as per this requirement I created screen flow. I demo demonstrated you how we can create opportunity. So now I'm going to debug this so that you will see whether opportunities created or not. Right. So here you see this debug button is available. So I clicked on debug and refreshing this. So here you will see one opportunity will be created after filling those information. Let me refresh it again. So here you can see our first screen is available. That is showing create opportunity called. This is the label of the flow. And here you can see this help text is available enter opportunity name. If you have provided help text for scheme so that also shows here. So here I am putting name as text opportunity from flow. So it is the name of opportunity from here I need to choose close date. So let's say I'm choosing this one. Now I'm clicking on next. So at right inside you can see it is showing what you did. So you executed screen one. So it is showing its API. Then you entered some value in opportunity name. So label was opportunity name and value at runtime. So we entered this value. So that's why it is showing here. And for close date we entered this value. So it is available here then selected navigation button next. So this way you are able to see how we can debug a flow step by step. So whenever you create flow. So once you activate that flow before activating you can just debug it so that you can test whether this flow is working properly or not right now. Here you can see pick list choice that is available. So this we expected from the field that is stays name available in opportunity object. So I also demonstrated you how we can fetch values of this field on the object in this flow. So let's say I'm choosing qualification. Clicking on next. So after this we don't have any screen. We just have create record. This element. So let's see it right inside what happened next. So here you can see after clicking on next screen to was there. We put stays name data type was text. Then we put a qualification right then again we clicked on next. So next element that is create record executed. Then it is showing create one opportunity record where closed it is this name is this stays is this. Here it is saying a record is ready to be created when the next screen for the local action is executed or when the interview finishes. And here it is showing the ID that it is related to the record that is created. So let me refresh this or we can directly use this to open the record. It is the fresh now here you can see this opportunity is created stage and close it right. And if you want to open this directly so you can use that ID as well. So once you copy and paste this ID so that record will be opened automatically so that you can view all the details which are available in that record. So we entered only three values opportunity name stays and closed it. So those values will be available. So here you can see stays is qualification close date is 31st March 2020 and opportunity name is test opportunity. Right. So this way this flow work and I demonstrated you how we can debug a flow. So I hope you understood all these three points. And if you want to watch more Salesforce training videos, you can search my name Sanjay Gupta and don't forget to go to playlist so that you can see various topics there. I hope you understood whatever I demonstrated in this video. So keep watching Sanjay Gupta Tech School YouTube channel. Thank you for watching this week.