Now that we have a good understanding about our local relationship let's have a quick look at some of
the considerations while creating and using lookup relationship in our data model.
We have considered the relationship between student and extracurricular activity is a lack of relationship
right.
And we have also created that and sales force know that like let's understand what does it look up filter.
If you remember while creating a look up relationship that wasn't there was an option for look filter.
OK so let's quickly go to that.
Go to the Student object which is a child object and go to the lookup relationship field that we created.
Here is that and here we see that option of look up filters.
Now let's understand what's this.
Look up filters so to understand this concept up look up filter.
I have done some data set up what I have done this in this particular object.
Extracurricular Activity which is a parent object I have created a new field that is called is available
to take meaning in our interception assumption that not every extracurricular activity is available
for students to take in that particular year.
Some may be available some may not be available maybe because of the arrangements that does hold that
institution works.
All right.
So the assumption that we have taken this that is a new CheckBox field in the extracurricular activity
field.
All right.
And we'll leave for this checked.
It means students can pick up that particular extracurricular activity.
So that is how the business process that we're assuming.
But know that there are a lot look up filters that are configured.
Let's see how it behaves.
For example I'm creating a new student tracker and here when I click extracurricular activity irrespective
of whether the available checkboxes check are not all the extracurricular activities is available for
me to pick right.
However I do not want the situation to be like that.
I want the situation to be in such a way that only extra curricular activities which is available to
take meaning that check boxes check only those should appear up here.
All right.
So this is where the restrictionists.
So whenever you want to fill that out the records that is shown as part of the lookup relationship then
look up through that comes into picture.
Now let's see how do we can figure this look up filter.
So for configuring lookup filter again and go to that particular relationship field we have already
created the lookup relationship.
So she dated button and here you go the lookup filter.
And here we have to set up the filter criteria and the filter criteria is that she'll only those at
a class where the available to big check boxes checked.
And that is available in this extracurricular activity.
Object so big that object and then the available to pick checkbox.
And as you can see there are other options as well.
Generally in real time the common options would be to filter out based on the record type or to figure
out based on the user's profile.
You know maybe like only some certain users would be able to access some certain look up records based
on the profile based on the rule.
All right.
So these are some of the very common scenarios that we encounter in real time.
But now to understand the concept I have taken this example of it and available to take in said All
right we have the field and the operator the operator should be equal to
right.
So now that the filter criteria is set and if we have multiple criteria then we have this option of
fruit that logical.
So all right say for example you have two three four and you can say like one and two or three.
All right so the logical also can be said here.
So now that the filter criteria is set the next option is whether this filter criteria is required or
optional required meaning only those guards which satisfy the criteria will appear in the look up window
optional meaning the filter would however appear.
But it is up to the user to use that filter or not to use that filter.
So it is up to the user.
So that doesn't meaning of required an option.
Now that like let me stay with required and that is also an option for giving some look of window text.
And once all these options are enabled.
Finally enable the filter.
All right.
So hit the same button.
Perfect.
Now that we have configured our look of filter.
Now let's see how it behaves.
So again go to the student card and here.
Now I only see the two records because the thought extracurricular activities where the checkboxes not
checked.
Right
so among the three extracurricular activities requires only two records have this checkbox check.
And the third card doesn't have it checked.
So that's a reason only two records are available and might look up vandal and there are no other options
whether it is.
You know that it is up to me to select the filtered off not because we chose the quiet option.
Now let's also see like how it behaves when we choose the optional option
Gloria the relationship field again.
Engaged.
And here.
Now let me say optional.
All right and now let's again see how it behaves.
All right.
So now do you see the difference.
Results are narrowed down by criteria said be the administrator shall always meaning.
This is the output of the criteria.
The criteria is one when the checkbox is checked.
So I see only to record how valid.
It is up to the user to see that all records also.
So now that the third record is also available.
So this is the meaning of optional and the fullest one that we saw was at a quiet.
So this is the concept of look up filters basically used to narrow down the options given to the user
while associating it bla banner art.
So now that we have got a basic understanding about the lookup relationship how to create that how to
behave how it behaves and what are all the various options available to us by creating the lookup relationship
it's time for us to see about the reports and how they are related to look at relationship and what
happens when a new lookup relationship gets created.
Basically whenever the object is created and sales force automatically a standard report type also gets
created by default.
Here we have created some custom objects like courses students instructors department many custom objects
we have created.
Right.
And at that point of time whenever we create those custom objects automatically standard report types
are also created.
So what does that mean.
Go to the report step
and when you do report the first step is to select the report type.
Right.
So the are automatically some of the standard report types out here.
However for the custom objects whenever they are created automatically some standard report types are
also created.
So now that we have created the lookup relationship but before creating the lookup relationship what
happens is
some standard report types for that particular object is also created.
So courses and with a history class history instruct our students departments extracurricular activities
so on that report types for that object by itself would be existing.
So this would be before creating the lookup relationship now that we have created the look up relationship
the scenario would be different.
This is basically a screen print.
What I have taken before creating that lookup relationship so here before creating the look of relationship
we have only the standard report types of those corresponding objects.
However now we have created a relationship between student and extracurricular activities.
So now let's see how the report types have modified go to Fuller's application.
And here we are in the report step and now
let me say students so students before creating the lookup relationship only student and student history
was there.
And now like I can also see student with extracurricular activity.
So this is what I mentioned automatically standard report types gets created whenever we create to look
up a relationship.
All right.
So for students students with extracurricular activity and for extra curricular it what it was already
there when we created these custom object.
So this is a fine detail that we need to know when you whenever you couple relationship gets created
automatically your standard report type also gets created.
So this is all about look up relationship.