 Hello friends. I'm Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. In this video, I'm going to demonstrate how you can create a record within Process Builder in Salesforce. So let's understand this use case first. So use case is when an account is created and its type is prospect. So type is a field on account. So if that field is having prospect as a value, so then we need to create an opportunity associated with that account record, right? So I'm going to demo this with the help of Process Builder how you can accomplish this. Before that, if you want to follow Salesforce training videos, you can search my name Sanjay Gupta on YouTube and you can follow my YouTube channel. Now I'm going to implement the process builder. So here you can see I created a process builder already and I only set the object on which it will be executing. So that is account and process will start only when a record is created. So we don't want to run it for modifications. So that's why I'm choosing first option only. Now I need to add the criteria. So check account type. So here we need to put the conditions. So from here I am searching for type. It should be equals to prospect. And I am also choosing it again is null false. So both the conditions should be true. It accounts should not be null and account type should be equals to prospect, right? And in between both the conditions and will be available. It means both should be true. So this is our criteria. Now I need to set the action. So for that I'm selecting create the record. So we need to create opportunity record. So create of record. Now we need to select the record type. So we are going to create opportunity record. So you can type object. So right now we have only one record type. So that's why it is not shown option. And here it is showing the required field and along with focus category option field. So you have to fill all these information. If you want to add more fields, you can click on add row and select additional fields as well. So for close date, I have to fill the date. So let's say I'm choosing disclose date March 20 then name. So test of our account stage. I'm choosing as prospecting forecast category. I'm choosing as pipeline. So this way I filled all the information. If you want to choose any other field, so you can click on add row. You can find a field. So if you scroll down, so here you can see all available fields are there. So let's say I'm choosing amount. So I'm filling 1000 as currency. So this way you can fill the fields as per the requirement and you can click on save. So here you can see an immediate action is created. Right now we need to associate this with account as well. Right. So you need to choose account ID. Then field reference and you need to find ID of the account. So here you can choose this account ID and it will be available here. So on opportunity, there's a field named as account ID and in which we are filling account ID of the record through which this process will be initiated. Right. So that this opportunity will be linked with that account so that they will be sharing master detail relationship. So now I'm clicking on save. Clicking on activate confirm. So this way a process building is ready to test. So now I'm going here. I'm creating an account. So I'm clicking on new. So its name is test account. 2020. Then I have to fill the type so it is prospect and I'm clicking on save. Now we need to go to related list. So here you can see when opportunities created automatically. So I'm opening it in new tab so that you can see the details as well. So I'm clicking on details tab and if I scroll down so you can see name of opportunity account is associated automatically amount is available close date is available stages available and probability is available. So this way I demonstrated you how you can create a record automatically with the help of process builder while creating a record. So we created record of account and opportunity record is created automatically and we can also link these two records by filling lookup or master detail field. So I hope you understood how we can use process builder for this purpose. If you want to watch more Salesforce training videos, you can search my name Sanjay Gupta on YouTube and you can follow my YouTube channel. So I hope you understood whatever I demonstrated in this video. Thank you for watching this video.