Now that we are done with a configuration setup it's time for us to understand more about the indirect
look up and the external look up relationship.
So what does the configuration set up that we did in the previous lecture.
Basically we used to say this will connect to establish a connection between Salesforce and they extend
that system so lovingly say external system.
We should note that it is not a real external system as such but a sample data source that runs on the
local platform.
So for that that we initially started off with the installing a package that is given by Salesforce
and then we created a data source connection and thereby we configured a couple of external objects
so the external objects that we would be using are orders and order details so all the competence that
is involved in this entire configuration that is provided by Salesforce tool that the package that we
installed so we have successfully installed that and if we have those external objects ready to use.
So let's go onto the sands for you like these are the couple of external objects that we used that we
are going to use basically orders and order details.
So these external lobbed using these external objects we would be basically learning more about the
indirect lookup and an external lookup relationship it's the one main important thing that we need to
understand why using those external objects is a type of relationships that we have the options that
they got available in front of us.
So then a lot of the EU's external objects you our sales facade there are three different options they're
not available to us.
What are all the three different options that does agenda look up a relationship that we generally create
and the other two are the indirect look up and the external look up relationship so then the external
object then the child object is the external object then these three options that are available to us
because we know this indirect look up and external look up more these relationships falls under the
category of look up relationships however these two indirect lookup and external look of the use whenever
external objects are in.
Right.
So whenever a child object is an external object then we have these options in front of us.
So then we know that there are three options in front of us.
We should know which option to use then right.
So when our child object is an external object then we have the lookup indirect or the external look
up.
And as you can see in the stable differentiation when the child object is an external object and then
the parent object is a sensible full standard of custom object then we can create a lookup order indirect
lookup relationship and then the parent object is also an external object then we clear the external
lookup relationship so that differentiation is pretty clear right.
When the parent object is a stressful standard or custom object we create either a gender look up relationship
on the indirect lookup relationship and the parent object is an external object then we clear the external
look up relationship so null again we have to understand then we create the regular look up and then
we create an indirect lookup relationship Sylvan the child object is an external object and the parent
object the standard sales force custom order standard or custom object then two options that are available
look up indirect look up but then then the external object contains a column which has a sales force
regard i.e. then we create a regular lookup relationship but when the external object does not store
any Salesforce 18 digit at a card eighty instead has got an external lady that can be mapped with a
successful standard our custom object then we go for the second option that does the indirect look up
relationship.
In fact this is a pretty common option and this is a generally common scenario that is usually available
even while doing the real time projects that is a child object is the external object and the bat and
object will be a standard stance full stop.
Standard of custom object that no says is 18 digit i.e. stored on the external object.
So in that scenario will go for the indirect lookup relationship.
So this is the main concept behind the three options that are available to us.
So let's learn more about this indirect lookup relationship so for other learning purpose the option
that we're going to consider this so we know that for a look up relationship we need a balanced object
and a child object.
So in our scenario the padding object is going to be a count that is a central standard object.
And the child object will be artists that does that one off the external object that we have and the
matching field and padding.
So what does this matching feel we have to understand Moorabool despite so let's go to the sales schools
you like we have a dart as object that is an external object which should also be the child object in
our case.
Let me also add the standard accounts object
for effect.
So now we have the bat and object that does that count and the child object that is art us and now we
add blame to create the indirect lookup relationship between the external object Artist and The Phantom
object account so for connecting this art as an account that need to be some common data right.
Definitely because whenever we establish a connection that need to be some common data using which we
can map.
So basically in every parent object there has to be a field that stores their data using which we can
connect to the child object so in other scenario the field that we would be using is the custom right
field.
So this customer already feel a null force we have to understand how this customer I really feel got
created right.
So this customer I feel God created as part of the package installation that we did.
So the way we installed the package automatically this field got created and the icons object but in
real time what happens is whenever we map a particular object to an external system external object
we create this external field and the external field is always most of the scenarios that would be unique
because that is a unique field that we use for mapping to get our cards right.
So that would be unique.
And we also say that it is the external I.T. field meaning this particular field will be used for mapping
the data with the external object or the external system.
So that is why we market as external lady and we also market this unique so every order record would
would map itself to the phone record.
Based on this value customer i.e. so some sample data also has been loaded on this custom variety field
so go to accounts sorry go for all accounts and you must be able to see the customer already feel if
not you can just pull it from the layout it might not be visible on the layout.
So just put it on the page layout so you can see the customer already has got some value that is to
hear so all artist that I'd do would automatically get mapped to this particular account but now as
we have not created any relationship between accounts and ADRs they are just two independent objects
you can see in all.
There are no related lists like artist because we have not created any relationship as such.
We just have the data.
So what would basically happen after we create a relationship is what we are talking about.
So in the art as object
we have a field goal less customer.
Right.
So this customer loyalty would be matched with the customer idea that we have in the accounts object
this customer i.e. in art does we have a custom variety and that would be matched with a customer i.e.
off a course.
So then we say that customer I.D. is still all the art us with the customer I.D. S2 would be mapped
with this particular account.
So this is the purpose of the external I.T. field that we have in sales force those external I.T. Field.
We specifically use whenever we establish a connection between the sales for standard of custom object
with an external object.
In our case it does icons and we saw we have a field here that is a custom variety and that is a unique
external lady field and that field they use it to map to all the external object that is art us.
But now that we have not created any relationship between account and art us they are just a two individual
objects that we have no relationship.
But now we are going to create the indirect lookup relationship between icon and orders.
So going back to the basics we are going to create the indirect lookup relationship the parent object
would be account the child object would be orders so adjust the regular way of creating a look up relationship.
So what do we do when we want to create the look up relationship.
We go to the child object and then we create that relationship feed right.
So he had our child object as art us so go to the fields.
And this is the customer I.T. Field.
Basically this field we would be using for mapping it to the parent object.
But now that we have not establish a relationship they are just independent objects.
You can see the number the data type is number.
So what they are going to do is we are going to change the data type from number one relationship field
so hit edit changed the field type and now as you can see the child object being the external object
we have all the three options that is available to us.
That is a look up relationship external look up and the indirect look up and now we are going to choosing
that I look up and a way out of choosing indirect look up because basically the choosing that I look
up the number of the child object as an external object and the parent object as a fanciful standard
or custom object and that Salesforce is 18 digit I.T. is not stored on the external object so you know
what is the external object art is not stored any sales flows that a guard is there right.
So we go for the indirect look up a relationship.
So going back choose indirect look up here next related to meaning the parent object that is accounts
the target field.
So basically it is asking for the matching field which field should I pick from the accounts object
which field should I compare in the accounts object so in this is the only external I.T. field that
we have not going to object in case you have multiple external I.T. fields all the I.T. fields will
be listed here and you need to choose that I too want Silvia here we are choosing this custom right
field
fill in the details here give a meaningful description and the child relationship name
for now let me make it to a symbol for all profiles however and real time that would basically depend
on the people who who should be having access to that data.
The related list label let me make it external ADRs.
So that would be more applicable here.
Kid Safe.
Perfect.
So now what we have done this.
There was an existing field that is customary which was a no field so that we changed the good relationship
field.
That is a indirect lookup relationship.
So how the relationship basically works is all orders with the customer i.e. mapping with the customer
idea of icons would be tacked together in other scenario data was already existing in the icons object
and for that field a custom variety and data was also existing in this art as object.
So now that we have created a relationship automatically a relationship has got created between orders
and outcomes.
How do we see that first.
Let's go to the orders object
this is the order of a card that to be half.
Now you can see at this customer I.T. Field which was a number of field it is now a relationship field.
So when we click on that field it automatically takes us to the account to which are the stack 2.
If you see this customer I.D. six so all orders with a customer I.D. had as six has got matched to the
account with customer I.D. A6.
And now that we have created a relationship this related list is also available here so we can see all
the orders that Don map of this account.
So what does a common factor on these orders have the customer I.D. 6 and this account also has the
customer idea.
Six similarly all are the other orders that we have also has guard map to their respective accounts
for example to a
so they automatically takes me to the account that is a bank account and we should be able to see all
the orders there got back to this up.
So all the orders have the customer I.D. as twelve.
And this particular account also has to guard the customer radius.
So that is the reason we say that the bad and feel has to be a unique field because whenever the order
record there is a child that a card such as for a pattern there should be definitely only one account
that that particular customer.
Right.
So that is why the external I.T. fields are generally marked as unique.
So as to avoid any sort of flawed data duplication so this is all we create an indirect relationship.
So to repeat for our indirect lookup relationship the patent object does not count and the child object
was ADRs.
So whenever we create a relationship field we always create on the child object.
But initially in this setup basically the field was already present with the preloaded data.
So basically we converted the data type from no data type to a relationship field.
That is an indirect look up and then we created the relationship.
Finally we also configured the page layout the related list labels and everything.
So once we are done creating the relationship in the accounts object that is a balance object one related
list was created that is external orders so that a list down all the R does that get back to that particular
outcome.
The other important thing to note here is the external lady that is created on the parent object which
connects the sales force object and the external object.
So this is how we create the indirect lookup relationship between our sales for standard or custom object
and any external object.