 Hello friends, I am Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. In this video, I'm going to demonstrate how you can update parent record while creating child record. So in our use case, when an opportunity record is created with this child, then we need to populate its created date and time on account record. So before starting this, 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 as per this use case, I created one custom field on account so that is last opportunity created date and time. So on account, we can have multiple opportunity. So we need to identify which opportunity is created last and we need to populate its date and time. So that we can identify the last opportunity creation date and time. Right, so opportunity record will be created and it will update its corresponding account record. So for this process, we need to implement. So I created a process on opportunity object whenever a record is created, it will work. So I'm clicking on save. We want to run this process always. So that's why I choose no criteria just execute the action. I'm saving this as well. Now in immediate action, I'm adding an action to update the record. And here, we need to write update account record, then we need to choose the record type. So count is related to opportunity. That's why I'm choosing this second option. Then account ID. So the account ID, which is associated with the opportunity will be updated and we need to update the field last opportunity created date and time. Field reference. So I'm taking field reference of created date that is available on opportunity. So opportunity created date and time will be filled in this field that is last opportunity created date and time. And I'm clicking on save. So whenever on an account record, you will be creating an opportunity. And created date and time will be populated on the account and previous one will be removed. So now I'm clicking on activate. So right now you can see it is blank. And it is having two opportunities. Those are created earlier. Now I'm going to create new one. So it's name is best opportunity for account number three close it stage and save. So this way you can see third opportunity is created. Now I'm moving to details doing the refresh in details you will see the field is populated. So it is showing date and time as 1141. Right. So we created an opportunity related to that account. So now I'm going to open this opportunity and let's check its date and time. So I'm moving to details. So here you can see created date and time is same as it is available on account. So it is 1141 and here also it is 1141. Right. So this way it is working fine. Now let's create one more opportunity. So date will be same but time will be different. So I'm creating test opportunity for account and it's number is four. Choosing close date. Choosing stays. So let's say fill more fields so that time will be changed. So, so earlier opportunity was created at 1141. So I want to pass one minute so that it will be 1142 or 1143. So I'm filling these details so that we can pass one or two minutes. So order number generator is tracking number. So this way I filled all these information. So now I'm going to save this opportunity and let's see. I'm refreshing account record and let's see what date and time is populated on that field. So I'm moving to details. Yeah, so here you can see data same but time is 1143. So last opportunity was created on this date and this time. So this way whenever you create any opportunity on account record. So last opportunity created date and time will be populated on account always because of this process. So I hope you understood how we can update parent record while we are creating or updating child records. 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. I hope you understood whatever I demonstrated in this video. Thank you for watching this video.