 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 your parent record while creating or updating any child record with the help of workflow rules. So meanwhile, you can see how you can pause Salesforce training videos. You can search my name Sanjay Gupta on YouTube and you can follow my YouTube channel. So now I'm going to create a new workflow rule so that we can implement or achieve that. So to create new workflow rule, I'm clicking on new. So here I'm selecting child as book history and its parent is book. So we are going to work on book and book history objects. So workflow rule is available on book history. So name is update book. I'm selecting first option as created. Then it is showing book histories and book related fields, then user related fields. So for book history, I'm selecting issue amount is greater than 500, right? So if you are creating any book history record and book history issue amount is greater than 500, then this rule will be fired, right? Now I'm clicking on save and next. So now here I have to choose new field update as immediate action. So update book records. So here you can see it is showing field to update. It is showing two objects, book and book history. So book history is child and book is parent, right? So also remember that whenever you are implementing workflow rule field update, so this can happen on custom objects, right? So book and book history both are custom objects and they have master detailed relationship. So in that scenario, you can implement this kind of field update like you are creating or updating child record and the immediate parent record will be updated automatically with the help of this workflow rule, right? So for book, I am selecting this field that is last activity on any related record, right? So from here I need to choose a particular date. So it is asking to build a formula. So I'm going to build a formula, right? So what I'm going to do, like there's one book record and various book history record can be there. So I want to populate date and time of a book history record that was last created on parent book record, right? So from here I am going to insert created date of book history, right? So this will be set in this last activity on any related record, right? Now I'm going to check the syntax. So syntax is correct. I'm clicking on save. So maybe a book record having multiple child records. So let's say one book record is having five book history record. So now if I try to create sixth one, then the sixth one created date and time will be populated on that field. That is available on book record automatically. So I'm clicking on save. I'm activating it. Now I'm opening my university app where these objects tabs are available. So here you can see book tab is available that is having book records. So here I'm opening one book record. So it is having last activity on any related record. So right now it is blank because right now we created work rule. So now I'm going to create a book. I'm going to create book history record. So I'm clicking on new. So filling these dates from here I'm selecting this book and providing issue amount as 1000 degrees should be greater than 5000 500 if you want to trigger the work rule. So I'm clicking on save. So here you can see I linked this book record. So I'm opening this one is having. So here you can see this field is filled with the date and time when that record is created. So it's related record is book history. So you can click on view also that you can see all the records and this is the last which I created. So it's date and time is mentioned here. So notice the time 1039. So now I'm going to create one more. You will see that date and time will be updated. So I selected 0005 books and right now I'm filling amount as 600 clicking on save. Now moving to this. So here you can see date and time is 1046. So if we see the last created record, so it's date and time is date and time is 1046. So this way you might understand if we update any child record. Sorry, if we create or update any child record, then automatically parent record will be updated with the help of field update. So this way you can create field update in workflow rules to update parent records. Remember that this you can do with custom objects if you have master detailed relationship. So I hope you understood how this can be accomplished in Salesforce. If you want to watch more Salesforce training videos, you can search my name Sanjay Koptan YouTube. Thank you for watching this video.