 Hello, friends. I'm Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. So in this video, I'm going to demonstrate how you can create report on duplicate records. So we will be implementing these components in Salesforce. So first I will be creating duplicate rule that will be using a matching rule. Then I will create a report type and then report, right? And if you want to watch more Salesforce related videos, so you can go to description of this video and you will find links of all the playlists related to Salesforce. So do follow them. Now, I have already logged in Salesforce, so I'm going to create a duplicate rule. So in setup you can search duplicate rule. So I'm going to create duplicate rule on contact object. So the existing one I already deactivated. So I'm going to create new rule on contact. So this is the name of rule. If you want to put any description you can put, then object is already selected as contact then record level security. So if you want to enforce sharing rules, you can choose first option. And if you want to bypass sharing rule, then you can choose second option. You can read this help text as well. So it is showing what happens when you enforce sharing rule or what happens when you bypass sharing rule. And then we have two actions. So action on create and action on edit. So there are two options are available allow and block. So what does it mean, it means like if you, if you are trying to create duplicate record. So what do you want to do you want to allow or block. So I just want to allow them action on edit allow then alert so whenever you will be creating a duplicate record so it will alert you. Now this option is important report. So we are going to create reports on duplicate record. So that's why you need to check this option. Then action on edit so choose this option as well. And on edit if you want to alert like record is a duplicate. So you can check this checkbox as well. Then alert text, you can write your own customized text, or you can use this standard one. So now here we need to select a particular matching rule. So this is the standard contact matching rule. We don't want to use that we want to create new one. So you can click on create new matching rule. Before going to that here you can see conditions like you can put optional conditions as well like if this condition is true, then only that duplicate rule will be fired so you can do that as well. Now I'm going to create a matching rule. So it is asking for saving this duplicate rule. So I'm clicking on save. So now it's time to create a matching rule. So here I need to put the condition so let's say I'm using email option. If two emails are exact, then this rule this matching rule will be fired. So I'm clicking on save. So here you can see this matching rule is created which we work on exact emails. So I'm activating it now. So it will send me an email on my linked email ID. So I'm clicking on. Okay, now I can use this matching rule in duplicate rule. So I'm moving to duplicate rule this and I will be here. You can see that matching rule is automatically selected. Right. So if you want to click on add it and you want to choose any other matching rule. So you can do that as well. Right. So this way, both duplicate rules and matching rules are created. Now I'm moving to application. So I'm opening sales app so so that we can create duplicate contacts. So now I can create contacts. So I'm filling Sanjay as first name, Gupta as last name, then email. So I'm writing sanjaygupta.txt school and then gmail.com and clicking on save. So this contact is created. So first time I created a contact with this email so it is not showing any duplicate alert message. Now again, I'm going to create one more record with same information. So name can be different, but email should be same so that duplicate alert will be displayed. So sanjaygupta.txt school at the gmail.com. So I'm providing same email ID. So I'm clicking on save. Sorry, I just forgot to activate duplicate rule. That's why it is not giving any alert. So again, I'm searching the duplicate rule. So you will see that I didn't activate that duplicate rule. That's why it is not working. So in order to apply a particular duplicate rule, you need to activate this first. So now it is activated. Now if I try to create one more contact with same information, so this is a third record which will be having same email ID. So you will see a warning now. So here you will see, yeah, the record you are about to create looks like a duplicate open an existing record instead. So if you click on this view duplicate, so it will show you all the duplicates here you can see. So to I created an earlier also I created some contacts with this email ID. So it is showing all the records. So you can choose a particular record instead of creating duplicate one and if you want to create this, you can click on save. So this way we can apply matching rule and duplicate rule. Now it's time to create a third entity that is report type and then report. So first I'm going to create a report type. So in setup you can search for report type then select this option click on continue. So here you need to click on new custom report type. So from here you need to select the primary object. So for primary object you can select duplicate record set. Then label so label will be report on duplicates. So this is report type name. So I'm copying this as it is and pasting in description and we are going to store this into others. Yeah, sorry, in other reports. So report folder you can select as per your requirement. So this way primary object is duplicate record set. I'm clicking on next. Now I need to click here to so that I can relate one more. So here you need to select duplicate record item. And then you can click on save. So this way you can see we created a report type report on duplicates. So now using this report type we can create a report. So now last entity that we need to create it will be report. So I'm moving here, clicking on new report. So creation of report is pretty simple. You need to just select the report type and then your report will be created. So this is the report type in others report folder. So here you can search. Yeah, here it is report on duplicates. Click on continue. So here you can see duplicate record set and duplicate record item name both fields are available. So we need to apply filter. Sorry, we need to apply groups so that similar duplicate record item names will be available with a particular duplicate record set name. So I am applying it on duplicate record set name. So this will be a summary report now. So I'm running this. So here you can see this is duplicate record set name and the records which are duplicate. They are available under duplicate record item name. Right. So for this record we have this much of duplicate. So I'm opening this one. So this is duplicate record set information duplicate. And if we go to related so here you can see all the duplicates. You can click on view all and all the duplicate records will be available here. Right. So this way, you can see all the information related to a particular email ID so email ID was same. So that's why these are available here. So let me create some more duplicates. I'm creating one, two more contacts with same. Sorry. So test user and I'm putting email ID as Sanjay at the gmail.com. So this is first one. I'm creating one more as user to email ID Sanjay at the gmail.com. So now you will see it will show a warning for duplicates. So now it will show only one as duplicate because many records are not available. So here you can see only one record is available here. So I'm creating one more. So two records are there who are having email ID as Sanjay at the gmail.com. Now if we move to a report, so I just forgot to save that report. So again, I'm going to create that. So whenever you run your report. So try to save that so that you don't need to create it again and again. So grouping we did according duplicate record set name. So this time I'm clicking on save and run. So first I'm going to save this. So new report on duplicate reports. So it will be in private folder folder you can set accordingly. So I'm clicking on save. So now it is running. So you will see two records. Earlier there was one record having duplicates record associated. Now you will see two different summaries. So here you can see this is duplicate record set team record and it is having 20 duplicate records. Now we created one more. So right now I'm opening this one so that you can see the related records. So two records will be there and this is managed automatically. So here if we go to related. So here you can see two records are available that we just now created. And in details you can see duplicate rule is also populated. So it says through which duplicate rule these duplicate records are created. So this way you can explore it and you can find out the list of duplicate records in form of report. So I hope you understood how we can create report on duplicate records. So you need to create these four entities duplicate rule matching rule report type and report. So I hope you enjoyed this video and you enhance your learning. If you want to watch more Salesforce related training videos. So you can go to description of this video. So there you will find all the links of playlist that I created on Salesforce. So thank you so much for watching this video.