Configuring external data vessels and external objects in the previous lectures we discussed about the
different types of relationships that we have and sales force.
Starting from look up master detail many too many self hierarchy and we discussed all these relationships.
The only other two relationships that we had to discuss are external look up an internal look up.
So now let's talk more about this external look up an internal look up more these external look up on
internal look up don't they fall under the category of look up relationships they are actually very
different from the previous relationships that we discussed.
So then they say different how they are different they are different in such a way that they are linked
to an external system external legacy system in real time.
That system can be A.S.A.P. Microsoft or Oracle or virtual what other legacy system.
So basically we're integrating Salesforce with an external system so when an external system is involved
then we create these two type of relationships.
That is the external look up and the Internal Look up.
So I think now we understand the difference between the other relationships and these two relationships
and Salesforce the other relationships that the lookup master detail many too many self hierarchies
all these relationships is within the sales force OK.
Let's quickly have a look at our data model.
This master detailed relationship lookup relationship self relationship hierarchical relationship they
and their relationship was a deciding and Salesforce aka the bad object the child object the data everything
was exciting and since full SOG there is no external system involved here right from the configuration
from the data from the objects fields everything was deciding inside Salesforce however when we integrate
Salesforce with an external system then we have these two relationships that is the external look of
relationship and the internal look of relationship.
So now when we talk about the integrating Salesforce with an external system let's understand how to
make it happen.
So whenever we want to connect and access data from legacy systems Salesforce connect comes into picture
Salesforce connect is an awesome feature that is given to us by Salesforce which is used for connecting
Salesforce with other external legacy systems.
And as I mentioned before in real time that legacy system can BSA be Microsoft or Oracle whichever system.
And while we connect the assets you do not store any of the external data I never see as facade.
They basically store only the details of the link to the external data.
So basically what happens is a first we start with configuring the external data source so the external
data as well loses the connection to the external database.
So once we are done configuring the external data cells then we create external objects.
So what that external objects external objects are pretty similar to our custom created custom objects
and Salesforce except that they map the data that is stored outside of the since full SOC like for instance
the students is in Korea is a custom object right.
Does instruct us is a custom object departments is a custom object.
So all these custom objects we created in Salesforce and the data that resides in these custom objects.
They also decide and Salesforce he does not elsewhere right.
But for external objects the data assets do not onsite and sense force it resides in the external system
Salesforce only stores the link to the external data that is stored in the external system the external
database may have many tables.
So each external object that we create and sales force maps to each table in the external system.
Similarly each of the external objects fields the map to the table columns in the external system.
So this is all basically the whole concept of external data source an external object works.
Now that we have understood the concept it's time for us to replicate and create this scenario in sense
force go to the Salesforce application search for external objects.
So on that external data sources the asset to see an external data source here and external objects
that add more assets external objects defined so it will connect to an external system.
Basically we have to have external data source connection to connect to the external database in real
time a production environment.
Basically the legacy system would give us the details of the external data files for us to configure
and Salesforce but now we are only learning in our developer edition.
So as such we do not have any really external system to work with but for long us like us Salesforce
has very generously set up a sample external system so that we can understand this concept better.
So to configure and access that external system Salesforce has created a complete a trailhead for that
and that does a sensible connect.
Quick Start Salesforce connect so that you can pretty easily pick this up.
This whole trail here the unit is all about configuring the link to the external system creating external
objects and thereby how to create the external relationships.
That is an indirect lookup an external look up.
So for configuring this whole setup for us we need to install a package.
So let's click on the first module that is installing the schema package this package basically creates
all the necessary components for us to configure the setup and once we install this package we will
be able to connect to this sample data source which basically runs on here.
So now let's go ahead and install that package.
He does install this package link choose this option install for you all use us he'd install it may
take a few seconds and now like you see an instruction saying click the button to assign the customer
I.D. to combat cards.
So set customer I.D. customer I.D. I've been successfully assigned to counter cards click done perfect.
Now we can see that this package is successfully and start now this is in start.
The next step would be to create a data sales connection so let's go back to the trailhead module.
Go to the second module that is creating external data source connection.
And here it gives the instructions.
Copy this you all will be using it and Salesforce now.
So go to external data source.
Now let's create a new data source connection so hit new external data source and use that you want
to let we just copy
give a name for the external data cells here.
Let's say order DV or maybe you can give us some other name that makes more sense like you know external
audit or external system or something like that.
And here in type select the first option and the ones you select the first option you'll have this you
what I feel so user you order data that we just copied and leave the others as a default and the save
button now click validate and sync.
So when we do it at a standstill as basically it retrieves a ski mask from the external system so as
we see here these are different tables that are available in the external system such categories order
details orders payment payment mechanisms and on and off these for our learning purposes we need the
orders and the order detail table so select these two tables and click sync.
Perfect.
So now Salesforce has a retrieval the orders and order detail stable from the external system and that's
what we see here.
Orders and order details these are the two external objects.
Now let's take a quick look at these external objects.
Either you can click this order to the object which will take you to that page otherwise you can search
for external objects and we should be able to see these two external objects out here and ask me well
do these objects look similar to the custom objects that we create and says forth the main difference
is that the data does not decide here the data actually resides in the external system and these external
objects only hold the link to the data that is there and the external system so click on the object
to have a look at it.
This is the object definition page of this external object.
The main difference that we see here is the API name for all custom objects and Salesforce we have on
the screen let's go see.
However this being an external object underscoring the gaudy.
So make a note of it and similar to the name field and the standard name field that we have in custom
objects.
Here we have the external 80 field and there are some folder custom fields that we have for this object.
So this is the order's object.
Let's also have a look at the order details object similarly underscoring this X and it has got a few
custom fields and this standard field here perfect.
So now that we have these two external objects out here I think the next best thing to do would be to
create some tabs and expose these two objects into you light.
So let me quickly create a couple tabs so that I can see these objects
Artis
give a meaningful description.
Don't skip that out and then give it for all profiles.
However in real time we'll be giving the access only to the respective people.
So artist Ai was created similarly create for order detail step
don't give the description
perfect.
So now we have created two tabs for the orders and then are the details.
So here you can see all the records that does that and the artist object and you can see all the records
that is there and the order details.
OK.
Does displaying only the external lady in the water.
So what I'm going to do is I'm going to create a new view all external borders
and I'm going to include all the fields out here.
So we have a clear understanding and view of the data that is stored in this object.
Similarly do it for the order details as well.
So this is our whole art as object.
So we see here you know there are many records in this art as object and that is an external lady.
That is one other.
This idea is a of Sandoval's idea actually.
And there are other details customer I.D. alternate art ridership details you know there are these are
the data that we actually pulled from the external system.
Similarly for all the details also we have a lot of data here.
This is the same society.
And this is their display you all you know basically this you want to maps it to the external system
and we have an order idea here all the line product quantity and other data also we have perfect perfectly
configured.
So now what does that we have done we have gone figure out on external data source connection to an
external system.
Basically here it is a huge local system.
The sample system given by since force and we have two external objects with us the orders object and
the order details object.
So this object we have created to Babs so we can access those objects and see what's the data in there
and we have also created two views with all the fields that is available.
So we can have a better view of the data.
So we have these two external objects with us.
Now the art of objects and the already dense object
now that we have these two objects in place.
The next step would be to create a relationship that is the external look of relationship and the indirect
lookup relationship.
And how do we create that relationship and other details.
We'll discuss in the forthcoming session.