Salesforce Certified Advanced Administrator – Data Management Part 4
May 17, 2023

7. Duplicate Jobs, Duplicate Record Sets and Duplicate Record Set Items

Up against some of the limitations of the free developer accounts. One way to create duplicate record sets, which I don’t have any currently in my own, is to run a duplicate job. Now, running duplicate jobs is possible in Lighting Experience, but it’s only available in performance and unlimited editions. I think it’s also available in Enterprise because I’ve seen it there.

But most notably, it is not available in developer editions, of which that’s where we’re working. So you can refer to this help article which I’ll link to in the resource section of this lesson. But you can run a duplicate job and it will identify potential duplicates in your organization and will create duplicate record sets inside your and then you can actually report on those duplicate record sets as well.

So let’s give you an example of what that looks like. And then also you can create new duplicate record sets manually by clicking New and you can select the duplicate rule. And this is just to give you an idea of what one of these records would look like.

You normally wouldn’t create these manually, but you have to specify the duplicate rule that you’re wanting to associate the duplicate record set with. Now, there’s no record counts, it’s kind of dumb to do this, but you could then go into related and add duplicate record items and add those records and search for accounts and just do this manually. So if you wanted to adjust manually some sort of report results on duplicate record sets, you could go in, for example, and manually create that.

Now, so I’ve got a couple of duplicate record set items. The main point here is that you can run duplicate jobs if you’re not in a developer account,

and those will identify potential duplicates orgwide. Those create duplicate record sets of which each of these record sets will contain multiple items that are associated as well in these record sets with the duplicate rule that it was matched against. I also don’t know why record count is saying zero instead of two, but you may have questions around duplicate management on the advanced Admin exam, and I doubt that it’ll go so deep as it going into the nitty gritty of duplicate record items and potentially not even into duplicate record sets. But I wanted to make you aware of duplicate jobs and all of the above that we’ve mentioned as well. Now, I know as well that duplicate record sets are created through Apex calls whenever you have potential duplicates that way. I know that from personal experience and I thought they also created programmatically whenever you warn the user about potential duplicates inside of your duplicate rules.

And so the main things to bear in mind, though, as we round out the duplicate management side of things, are that you can create duplicate rules and associate them with an object, and they can contain up to three matching rules in a duplicate rule, and you can have up to five duplicate rules per object that are active at any one time. And then as well, you can reorder these duplicate rules to be evaluated in specific order that you want. You can also set conditions so that these rules only fire based on certain conditions, and that way you can explore exclude certain users from these duplicate rules, which is also helpful at times. And so, now that we’ve discussed duplicate rules, matching rules, duplicate jobs, duplicate record sets, and duplicate record set items, let’s now move on to other core components of good data management as we continue on in the next lesson.

8. Field Dependencies and Making Dependent Picklist Values Required

Now let’s look at field dependencies and also different ways that you can make dependent pick list values required. We’ve not really gone into field dependencies in this course quite yet, but I wanted to look at an overview of the different stages for opportunities. And as you go through the sales cycle the probability gets closer and tells at 100% and then if it’s closed Lost it’s 0%. And in this scenario what I want to do is I want to add a new custom field, a picklist field, so that if the user selects Closed Lost we want to make them select the reason that the opportunity was lost. So we’re going to create a new picklist field and it’ll be a dependent picklist field. We’ll make closed Lost the controlling field and then this new Reason Lost picklist field a dependent field. And so then the question would be how do we make that dependent picklist field required?

And there’s a few different ways to do that. So we’re going to cover that here shortly. But the first order of business is creating the new field on the Opportunity Object. So go into the Object Manager for the Opportunity Object and then select New to create a new field and this will be a picklist field. Then we’ll click Next and then for the field label we’ll enter Reason Lost and then we’ll enter values with each value separated by new line. Here are some typical objections you’ll hear if you are working in sales is either it’s too expensive or the customer no longer needs it or they’re not ready to buy. Don’t get too hung up in the different reasons. Just make sure you have several different options in your pick list field and then let’s go ahead and just leave this checked for restricting the picklist values to those that are defined in the value set. And we’re not going to make this required at the field level.

We only want this to be filled in if the opportunity is lost but other times it shouldn’t be necessarily entered in. So then we’ll click Next and then the next step here is to make this visible to the various profiles in your and we’ll just keep these the default. I just want to make sure that system administrator can see so that we’re able to see this in action and click Next. And then finally final step of this is that we need to add this field to our page layouts. We’ll keep this added to all page layouts and click Save. And so now we’ve created this new field called Reason Lost. Now how this will work in action is if you go into an opportunity that is not already closed as one or lost for example.

And I’m going to the Opportunities tab under all items and you see here are some that are closed one and here’s several that have not been won or lost yet. So let’s look at one of these and see if we can find our new field in the Details section of the page layout here. So we’ve got the stage is to identify the decision makers and then usually down at the bottom somewhere we’ll have Reason Lost as far as the new field. And here it is, here is Reason Lost. Now it wouldn’t make sense for a user to enter in Reason Lost before it’s been lost. And right now this is wide open and can be entered in as one of these options.

So what we need to do next is we need to create a field dependency. So if we go in to the gear icon to edit object and then go into Fields and relationships and then we select Field Dependencies, we can select by clicking New. We can select stage as the controlling field here and typically for controlling fields it’s any sort of picklist or multiseelect. So you’ll typically see picklist fields or potentially multiselect picklist fields as options here. So we’re going to have the controlling field be staged and then the dependent field will be Reason Lost. And here for dependent fields, I believe it’s only pick list, not multi select pick list can be dependent fields. So we will do Reason Lost for the dependent field and that’s the custom field we just created and that’s picklist field and click Continue. And so now here’s where we need to include or exclude values for these different designations on stage. So we want this not to appear or be selectable until it reaches closed loss.

So let’s view all stages and this will enable us to see all ten. I need to scroll over to the right to see closed loss but what I can do is I can include values. Well, let me select first. So I want to select the dependent picklist values and include those for closed lost, but not include or exclude anything for these other stages. And then we’ll click Save and click okay. That’s just saying that there’s other stages that don’t have a dependent value displaying and that’s how we want it to work. So now if we go back to our opportunity, let me cancel out of this and refresh and then we’ll try and edit it again.

We will see then that if we go to the details tab, the reason lost, there’s no options available because our stage is set to ID decision makers. And even if we set this to anything other than closed lost, it will still remain as not selectable. So if I click Save, we move this and stage this up to the stage negotiation and review, we still cannot get into this dependent pick list. Values don’t show. So where it comes alive at this point is whenever we select Closed Lost and now you can select one of these but it will allow you  to save this without selecting a Reason Lost. And so the main point of this is not only reminding you of how to create field dependencies and controlling fields and dependent fields and how that works, but also, at this point, how do you make this selection required? Because right now I can save this and it’s closed, lost. And we’re not capturing the reason why it was lost. And so how do we do that? Now there’s a few different approaches that you can take or attempt.

And so what I want to do and you notice here in the path that the closed lost displays in red and so I want to go in and edit this page layout. So I’m going to select Edit Page and this takes me to the Lightning app builder for the Lightning page that this is on. And then I can click in the either related lists or on the details. I typically just go to the details and click in here to display which of these four page layouts in this instance is the one that we’re actually on. Since I don’t think I’ve got record type displayed, it’s hard to tell which of these page layouts I need to edit if I were to go into just strictly straight through the setup menu. So selecting Opportunity layout, let’s look at making this field required on the page layout so we have Reason Lost so we can find that and where that is. And we also want to reposition this to where it makes more sense.

And so we could move Stage Lost under or we could move Reason Lost under the stage field and then as well we could click the wrench icon and make this required. Now the question would be okay, we’re making a dependent picklist value required at the page layout level. Will this make it impossible to save updates to records because there’s not going to be any selection you can make and the reason lost until the stage is set to lost. And so let’s save this and see what happens. And this is always the best approach rather than even googling or trying to figure out theoretically what might happen in one of these catch 22 type scenarios is just to put it to the test and actually do the work, get the hands on experience and actually see what happens.

So I have set the new field, the dependent picklist field and the field dependency to required and that does not come alive until and you can’t select anything until an opportunity is set to closed loss. Now this won’t be a good example for us because this is one that’s already closed and lost. So let’s go to an opportunity that is one and let me change my application to a sales application so that we’ll have the opportunities tab more readily available to us and let’s find an opportunity that is not already closed and lost. And so what we want to do is we want to find one that is not closed yet and try and edit it and see if we get any sort of error about a required field not being filled in for that Reason Lost field. So we’ll go to details, we won’t change the stage, we’ll just make some edit elsewhere. All right. So theoretically there is a required field for Reason Lost which is not showing is required yet. And so I wanted to show and demonstrate this. The stage is required and any required fields are designated by the red Asterisk. But the Reason Lost is only required if we set the stage to close Lost because it cannot be required if the user can’t select anything.

So I’m going to go ahead and click Save just to verify this. And indeed, even though it is a required field, it gets a pass because it’s a dependent pick list value that is not selectable at this point. So now if I try to edit once again, there’s nothing selectable. But if I do change the stage to Close Lost to bring that field dependency alive, now I can select something and you also see now that a Red Asterisk appears. Now if I try and save it’ll, say that I need to complete this field Reason Lost and then it will let me. Now that is one way to make a dependent pick list value required. Now, I’m not going to go into how to create a validation rule to also and not demonstrate that at least for sake of time. But you can also, instead of making this required at the page layout level, you could make it required through a validation rule. And that validation rule would look at if the stage equals Closed Lost and the Reason Lost is blank, then show the error and that would force the user to then fill in the Reason Lost or select it.

And that would be more apropos I suppose, if the Reason Lost were an open text field, because you can’t do field dependencies on a text field, I don’t think maybe you can and I misspoke there, but I don’t think so. There’s more than one way to do this though. One is through making it required on the page layout and knowing that field dependencies, you can make a dependent pick list value required. And it only is required once the conditions are met to where there’s values that can be selected or you can do that through a validation rule as well. And so that is something that may pop up as a scenario on the exam. So I wanted to be sure you are prepared for it and also just to make you aware of those possibilities as well, just to remind you of things that you probably learned when you were studying for the Admin exam related to field dependencies. And so let’s continue on with other methods and methodology for data management and we’re going to look at data enrichment in the next lesson and talk about what that even means.

Leave a Reply

How It Works

img
Step 1. Choose Exam
on ExamLabs
Download IT Exams Questions & Answers
img
Step 2. Open Exam with
Avanset Exam Simulator
Press here to download VCE Exam Simulator that simulates real exam environment
img
Step 3. Study
& Pass
IT Exams Anywhere, Anytime!