Lightning Connect and Lightning Process Builder | Salesforce Lightning Training | ZaranTech

related to lightning some of the people during the session they attended it and we have the same thing to be seen today as well because we need to understand what lightning is about how come it is different from whatever we have seen so far so first of all lightning when we say lightning as I have always told you that it is something that made things faster to develop it is the sole intention of creating lightning is to make to speed up the things so earlier we had different sort of interface for lightning and it had a different sort of interface when it was created with visualforce pages now using the light thing you can do all the development at one one place and you can make use of it at multiple places when I say multiple places I also mean multiple types of devices which may include your phones with different sizes your tablets your decks dick stops your laptops anything any cyber divide any kind of thing that you may have you can use it wherever you want to and why do we need it first of all because we know that anytime we are working dealing with customers it’s like 24/7 job because your customers may have problem at any point any moment and if you are a company which is operating 24/7 then it becomes more critical so you need to keep all the people at one place together and working so it be it involves your customers and employees both and you need to you know make use of all of them together so different sort of interfaces that really really help you when you work with them and if you have different sort of interfaces that also have multiple problems involved in it because different types or sizes of interfaces also means that we may have to code for them separately as was the issue with us initially as I said that we had dicks talked with had different sort of programming thing and then again when it for Salesforce one it had a different type of programming thing that is where the problem cropped up because everything will have an update the customer may have one or the other issue coming up one of the authority we I mean even if we goal I will always have this support team in the backend that will be taking up all the support requests because clients requirement that may change and client is what that is what the client is paying you for now if client is coming up with some requirement he’s also expecting you to you know deliver it as soon as possible but because now this dick stop version and this version was different it was very very difficult to you know sync up with both of them so that is where the updates part come into picture so anything if we are developing it needs to be not just developed for once and delivered but also it should be robust enough to you know make sure that all these changes it can absorb very easily so various apps the man I just quoted some examples like how many updates do they come up how many releases do they have usually with that into picture with considering all these things Salesforce lightning him into picture which made use of everything that was internally available including the force.com sites epics visualforce pages Heroku Wave all these things came into the background and it was reused in your components framework and the Lightning builder we will be developing as a part of the Lightning framework the most important part that I believe is the components if you understand how to develop components you can reuse it wherever you want to of course lightning builder and everything that is definitely there but because the component that involves development and all it mean means lot of things there you can make use of this lightning interfaces for sales service marketing any of these applications and if there is anything which is available on an app exchange even that too can be reused here in Salesforce so what it allows you to do it allows you to reuse your code and the same time make it more you know make it more simpler to use and when you are making use of some interface over whether you are using it through tablets or mobile or anything that will be all in sync that’s what is the sole purpose of making lightning further moving ahead we have interfaces like by we ultimately given how first thing is of course the speed speed of development and delivery second is responsive UI if you have noticed so far the DUI which was there and classic and the view that you have in lighting it’s it’s it’s like drastically different there are lots of things that were not there in classic which we have in lightning for example if you noticed that bookmark or maybe navigating to a particular record path and all so these things were not there they’re something which is come up there’s part of lightning so responsive UI contained based apps content based apps sari component based apps by component piece because these things are reusable many things are available out

of box are just dragging and dropping them that’s it any time you want to develop something you will have many things available out of box you can develop your own components and you can also get them from app exchange these will be very much extensible because you know that in even if you download it from app exchange you have managed and unmanaged up so you can extend them you can customize them if there is anything which is already available you can further build on top of it and it can be used on any type of device at any moment so ultimately what do we have we have this developer business divide what by developer business divide I told you that what was the problem the problem is not just a delivery but also maintaining the delivery whenever there is any change that is required so you’d connect a different business sources we were getting the data you were developing something and then you were putting on to system but in case of any iteration the same thing had to be repeated multiple time you’d not just start developing but also you’ll have to make sure that all these the regression testing and everything that is also in sync so to solve all this we as end-users we got these four different components to work for when it comes to lightning first part is lightning Connect second is process builder third is a component framework and finally it’s the app builder so far we have seen process builder and a builder what we have not known about is the connect and component framework I believe all of you remember while we were dealing with data data data types there was something called external lookup I had that time I told you the texture look up is something that exposes an external object and that’s where this lightning Connect comes into picture lightning Connect helps you connect with external databases through Salesforce what do we mean by external database so there was a problem initially when Salesforce came into picture it was with the various users or vendors that were looking forward to work with Salesforce they were like they they were very much apprehensive about their data being shared through some third-party systems so they were having issues with putting everything on Salesforce they were like what if my data leaks and all that it’s a different story that Salesforce itself is a very robust platform and there is no chance of leakage of the data at all it’s very secure but then at that time they had issues with it and even now many of these companies they do not believe in sharing everything on these systems they do integrate with multiple other systems and then they were connect maybe there may be multiple legacy systems that are still working and they may share the data so some integration or maybe through some data loader calls as invent that they des defied then only they are pushing it so lightning Connect helps us resolve all these issues what that tooth does is so if there is a third party system that is having some database at their end they can directly connect to these databases without getting their data replicated into system so yesterday it was a good question I didn’t I had told wrong about that part that there was wherever you are fetching data from data base to the Lightning connect the data is not getting copied it’s only the reference of it which is maintained in case if you create so PI you may have questioned that why ok let me first complete the topic then I’ll come to this so lightning connect enables you to fetch the data from external systems without creating a copy of it so ultimately the data is still residing in the client system only and we are only exposing that to Salesforce aware only directly fetching it to Salesforce that’s for the Lightning connect this data that we are getting that is read read only you can only date that data because you know you’re not fetching it you are just copying it I mean cop not even copying you’re just exposing that to this lightning connect so that is point one second part is the process build-up process will tell you know that any logic if you want to expose that you can do using the process filter it is nothing so process well there is nothing but the business layer where in any kind of requirement that you have got from your customers you want to implement that in Salesforce you have multiple ways of doing it you can do that to workflows you can do that through flows you can do that through triggers you can have multiple ways of solving the same problem but what is always recommended is do not code enter unless it is not really required if you make full slash use of process builder you’ll end up eliminating many codes in our system if not completely you will at least help reduce the you know total number of lines of code ultimately and when I say reducing the code it also means that we need not write any more test classes because now we have moved everything to configuration so it will save your time ultimately if you work with process builders and on top of it

it has got both flexibility to if you have noticed a part from outbound message it can do everything that a workflow can do come if you combine the process builder with the flow you can eliminate complete trigger I mean we have done it and it is not that difficult but yeah process builders has some issues will come to develop deployment for example if you copy the from process builder if there is an ID which is referenced within one org and if you deploy it to the other world it may not be able to sync up with that ID so that what you have to do is just clone and refresh average you can go back and remove and then add it again I know it’s a kind of rework and say very boring kind of rework but you don’t have any choice this is how it works but still process builder is very very powerful tool it can make use of it can really help you to eliminate many code pieces from us from a system if you use it properly so that’s one process build up then you have component framework what is this component river component framework is nothing but it is usability you do have websites you remember the example of visual first components that we did so what was with that there also it was the same thing you have a visual force page and you can have a component within that and that component can be reused wherever possible if you remember we gave the example of the sites having headers and footers the headers and footers are reused even if you try creating this Medusa The Critic communities right if you notice communities also had headers and footers if you create one page in community or if you create ten pages of community the headers and footers will always be same reason is that again that is also working on this component framework anything within that component anything coming within that component that will be reused across the all the pages that you have so component framework it takes care of such things where in anything that is supposed to be reused can we use multiple times not just within one interface but across multiple interfaces also you can package components as a single package and you can share it with multiple users just like what do you have in app exchange so what you do in app exchange there is one package and you can share it through that link that you have created or what you can also do is you can publish it on App exchange and share it through that so multiple ways of sharing are there the same is applicable to the component framework as well you create a component and you share it with everyone that you want to in larger organizations wherein there are multiple projects that are running now what they do is they create a repository kind of thing okay this component is component that an entire coding will be there and they try creating the components are there reusable you use it you create it once and you do use it wherever you want to and these components they can be used not just for one page but that can be reused for multiple places whenever required and that’s about the component framework you create it once and you use it anywhere and everywhere that you want to after that you have something that’s called a builder a builder is nothing but a place where and you can design multiple apps you and these apps can have different types of user interfaces these intro user interfaces may allow you to create the interfaces single page apps or maybe multiple page apps or record pages or home pages just by drag-and-drop you’ve already used them you tried creating some pages and all that is through a filter only so light thing it helps you makes thing faster and if you have noticed there is there are two things I important first thing that they’re focusing on is that everything should move to configuration if not everything at least maximum the things should move to configuration there should be more drag-and-drop rather than writing code second thing is even if you have to write code it should be reusable as much reusable as possible and that’s where lightning is above all so lightning connect let’s see that through the system so first of all to crew work on lightning connect I use the instant yesterday so I’ll share that URL and you can do it at your end so first of all you have to map a datasource and because that is present on external data systems we create external data sources two data sources external data sources means that is a third party system now here an external data source you can map anything I mean give it any name and for the type of data so select it as editor 2.0 because this particular link that is exposed to 2.0 delay in URL section provide the URL that I said there are list of the things like connection right table external objects data volume this this depends on like how much of data

you’re passing do you want to allow for search but because here the data load is not very huge you need not go for this but yes if if at all you have very huge data base and if you are sharing everything at your end then you need it plus if you are using any other certification method and if your database needs certification things for the authentication you will have to share this certificate I mean the third party system will have to share the certificate and attach it but because that’s a public one you need not do all these things for now so question actually asking you from how did we get this you said that it’s a hero ku app URL but I didn’t understand from where we got this and that XML that you showed how did we how do we generate that or how did we get that so first of all here oku you need to understand what Heroku is Hiroko is an internal thing which is provided by Salesforce that let you deploy and manage apps in any of the languages that you want to from a single system you can control all these things and you can work and develop from death so using that you can even have your databases exposed this particular link exposes a database from death and that is where it is using it you can even expose your Postgres sequel queries using this so in my current project suppose I am already having a database right and the problem is that I don’t want to share my data with Salesforce so now Salesforce is going to connect and access the data from my database and suppose my database is an Oracle database so for Salesforce to be able to connect to my company’s database they will need this URL right so I need to be generating a URL that is going to be pointing to my company’s database it means not to be exposed through head okuu you can even do it without that because Oracle I think is all that exposed thing and we check so just extension SUNY so what you’re saying is you have Oracle database inside your company right but correct so and you would like to so if if this URL is more like a property like a web service it like we can deploy a tomcat and we can deploy a web service right I don’t know I’m just I’m just thinking like what what are you showing the URL is that a web service is more like a sorry I’m just me let me put it this way there are certain apps that can help you access your data directly through data so for example force for Oracle we have something called sky by SK by Vi a sky by Kinect that helps you to integrate your cloud database without of the Salesforce so that will even allow you for auditor protocols so you can directly integrate using those solutions that you know that helps us as a connector between the Salesforce connect and your database so maybe that can help you at your end so the source database should be on the cloud my current company’s database needs to be on the cloud in order to Salesforce Jax is kind of not exactly on cloud but it should be able to establish the connection through some you know through some means because if you notice that type if you just scroll down there type there are all these different ways through which you can expose so your database what you can do is you can make use of some connector some connector like that of the skyway and it can do it can point to your database and expose it as a link and then that can be taken through either of these forms this is a separate solution we had two questions Mike right exactly it this is separate leaders what you’ll have to purchase because you know they can be multiple ways of doing this so one solution I’m telling you is that they can be connected you will have to search for it because every system has a different type of connector so for that to connect I mean one way is of course you can make use of lip service but VIP service again is all real time you’re sharing your data actually that is coming to Salesforce so instead of doing that we can even have connectors in place which

will just connect and expose through this auditor through the system what is this connect sorry lightning connector okay but how did you from where did you get this URL this one is publicly available if you go to Salesforce some some link I have found on that one so this is why this is publicly there but if you actually try exposing some okay you can even see what you can do is you can create a Postgres sequel and that – you can try exposing using this an example of how to expose existing database and they are provided this link which kind of their indirectly references their actual database yeah I mean you can even create your own because I have not created my own that as I exposed to sue this one but yeah if you have Postgres you can try creating that one that can help you or you can directly go to date or a coup sorry Heroku thing and you can create your sample database there and then exposes that is also possible okay and when we say order it is basically referring to one table in the database right so if you want to refer to cases then there will be a different URL to refer to cases this particular one in having multiple tables ordered SVC this is kind of schema which is exposed totally there is a trail it on that this same link is provided and for your requirement also I found something maybe I’ll give you one thing okay give me one day I will give you something for to sales first connection but sales but Oracle has AA data exposure is what I have seen in some of the slides so they’re there in exact tutorial maybe give me some time I’ll find it out and share it with you got you so basically what will end up happening is if I have an Oracle database by some means I’ll be able to generate URL by some connect or something and then once I copy and paste that URL here and proceed the data which is there in the Oracle database would now be fetched wire object and tabs in the Salesforce application even though that actual data is not residing in Salesforce database yes you can expose your data as a data service basically you will be exposing your data as data service that will be accessed through this Oh data protocol because this is what it understands and I have seen in some Salesforce slides only that it Salesforce and ICP they both are having exposure to auditor protocol what you need to explore is how to establish that dead Salesforce connection most so most likely you’ll be exposing some data service how you expose that that is what you need to see okay okay okay got you you had to think yeah now if you scroll down here is this validate in sync just next to that when you yeah yeah so when you do that it just establishes the connection and gets you this all these five tables with you yeah whichever you need you can select it and if you need all go ahead and sink and just by clicking on it you will be able to establish the connection even if in any of the databases that you take no I mean it is not going to take this much I mean anytime at all you choose you just are disconnection all the time that it takes us just to get the data service expose to Salesforce that is what you need to decide on like what are the means through which you can do first thing is like Oracle in thing I’m sure we have something for them because they are exposed to our data protocol but the mode the thing is that not everything is directly exposed to it maybe you have to create some data service kind of thing wherein you will be exposing whatever tables you want to share with Salesforce through that data service then you will get some link like that and that is what

you will share with Salesforce so that you can directly connect with them so all the homework that is required is just on this Oracle part like how to expose data through auditor protocol so then you can sync so the thinking part is actually creating the external objects within Salesforce invisible yeah it will create that external object and whatever is the related table structure that will be auto created so if you open any of these data structure data tables here you will have this API named orders underscore underscore X so any object name underscore underscore X X no square n square X means it’s an external object if you see the table is already created if you want to create new fields and all that will be created but now okay now that this table structure is created do one thing create a tab also so this is the broken tiny I think I’m the system at prints are so default on I just leave it as default on and there’s continued included in all the yeah you know the tablet showing clear records now if you can click on any of these external IDs it will show you the data right now this is a non editable mode because when you created that link to sync up the data I didn’t check for the Edit so that is why this is non elite able if you would have checked for the edit you can edit the record but it will not let you edit it because this is synced up with the external system that is non writable but if you create any of the fields on Salesforce and if you want to sing that you can do that you can you know edit that and then put your data that will not go to the third-party system it will only be on Salesforce so even though the data that you have fetched from other system it is pointing to that one but they edit that will not happen same example if I go to the developer console will I be able to run a select query on orders underscore underscore X hmm yeah you will be able to run a select query so SQL queries will fire here as well and it will behave just like a simple object so when I run it I will be able to see all the records hmm yes so when I’m seeing those records it’s not actually stored in Salesforce even when I’m running the query it is actually pointing to the external data base data source and it is fetching and showing it to me exactly yeah okay and now if I add a record create a record it doesn’t go back to the original obvious that’s what the correct yes it do not go back to the original but it will go into the Salesforce database yes even if you add the fields you will have it within Salesforce on D and won’t go back but then still like suppose the client who is not willing to expose their data because of which we came up with the Lightning Connect we are giving the read-only access but when we create new records on that same entity it is still getting stored I mean henceforth whatever records are going to get created it still is going to get stored in Salesforce yeah that will happen because see in and you cannot send it directly to Salesforce

unless until it is not created it within its environment whether you do it through web service or any other means so anything with we just created in Salesforce that will stay within Salesforce but if you want to send it back to the system will have to put on additional things for it so I mean the yes it is how it this is behaving currently so you don’t have a means to send it back automatically through lightning getting it though it is able to fetch it but will not send it back and when we mean that the clients data should not be exposed that what it meant to us that there’s the data which is already there with them that should not be exposed so maybe they can use it for something which is not creating within Salesforce or even if the data is created it is not created on the Salesforce interface but on that third-party system itself so let’s say if you are using oracle data is only created in oracle and you are only using it to view for the customer relations and things okay now as an example suppose I have a Siebel application and Siebel is hosted application right so the client has the data base they have installed the application they have installed everything and I’m a bank and I have all the customer details everything now I am planning to migrate from Siebel over to Salesforce and I want to go to the cloud but because I’m a bank I don’t want my database records to be stored on the cloud I wanted to be protected and kept in my hosted environment so this was the problem before that there was no option and the Salesforce connect or Lightning Connect is the solution because it is providing means to connect to the external database correct and which is which convinces the client that okay you don’t have to share your data with Salesforce or to the cloud you keep it in your own hosted application and we will connect to the database to fetch the data right all right now we are saying that with lightning connect the client will be convinced that okay now I don’t have any problem I am willing to go with Salesforce but what I am trying and what I’m not understanding is the data is still going to be stored in Salesforce if tomorrow I’m moving from Siebel to Salesforce as the CRM application and Salesforce is going to create new records but if those new records are going to get stored in the cloud database then how are we satisfying the client and in convincing them that there is no nothing to worry about that’s where I am kind of a bit confused see first thing Salesforce is a secured platform so that is one thing that we need to understand second thing there are already lots of banks that are working with Salesforce as their the CRM system so like Citibank JP rbl RBC lots of other banks are using Salesforce has their internal think that’s the first thing they thirdly if they’re still reluctant that they don’t want to work with Salesforce and they don’t want to put their data in Salesforce generally the system is divided in two parts wherein you still you’d will never be getting data into the Salesforce you will just be exposing them for customers purpose so for example I am just giving example here there are opportunities that are created on the Sybil account still they are created on Sybil account and we are just exposing the data to Salesforce for read-only things so rest all the operations that day Bank is comfortable with we can give them option to use them in Salesforce well this particular thing which they don’t want to share with anyone that will still desire themself in Siebel system ok ok so basically the client will have two CRM applications yes I mean that is what Delta bicycling do because if they I mean this is how the system is working you cannot let them completely use you know complete I mean this particularly this particular adoption like if there is anything which is creating it will not go back so that will not work for them if you don’t I mean even if you provide complete integration you’ll have to save it somewhere okay got you now if I add a new field to this order entity right and that’s a custom field so when I edit it I will be able to save the record okay so this field will get saved in the Salesforce database whereas rest of the records is going to be fetching on the fly from the other order DB date right so sales force behind the scene is going to merge the two operation one from the

existing database one from the external database and show it selectively to the user on the UI right yes so I’ve ping do one link if you can open that one you will see in that it exposes Oracle database through and maybe that you can use this yeah it’s it’s more like look up like when you do look up how does it work it just provides a reference to the previous record but if you want to access the data is still able to it suppose on the tab when I when I want to display all the orders so it will fetch data from external database and within the Salesforce for that particular record whatever the external fields I have added those information will be fetched right so in the switch I have an external object other than the new fields which I create any field gets created behind the scene to get it mapped if you go to the object shouldn can you please navigate to the object now if you see this one you do have the standard fields display URL external ID if you see this external ID this is what is configured it may actually because you need to have some foreign key to connect with it is existing on another system it is existing as a field and that field because that is marked as a unique field that this what is captured here as an external ID so any unique field that is marked as external ID and captured on system when you are creating the database where every system you are creating you will obviously have at least one field as external X as the unique field and that will be automatically picked up then you may have to check then let me check on this one because what I think is it will not let you expose it will ask in that case because that will be kind of conflict only let me check on this that if you have multiple columns how will you do that so let me get back on this one most likely will have to mark it as unique for one record and then only send it but also even one column and then only send it but let me check on this one I’m not sure if we have multiple IDs how will that expose because here what happens by default is any unique field that is Montes automatically is marked external ID and that is sent to the Salesforce it is coming from the data coming in I that I mean to a combination of multiple columns independent of three columns independent of each other and three are

unique okay yeah let me I’m not sure if we have multiple unique columns how it maps but let me get back on this I mean I will have to check if my lynge so multiple columns how it behaves so I just find it out and get back to this thing I don’t know thank you so there is one more link which is shade by sumit you can use this one also to share your data okay so this is on lightning correct yeah now this external object it can if you try to reference this in your database you will be making use of external lookup not the direct look up but external lookup so that is on these external objects the Nexxus process build up because process build a we have already seen I will not be going back to this thing again let me okay so what is this lightning enactus is fast real-time open or data protocol it follows and you know it in drought of course these are because you are exposing some objects through this external system and they’re like B and a on top of it also behave like your native objects so of course you have a bit an edge over that so like thing connect you what you need to do actually is you need to configure some endpoint as I told you any system that you are using whether it be a regular some other system you are not copying your data you’re just maintaining a link to it other friends to it and that is how you’re using it it just completely eliminates the data residency concerns if you don’t want to share the data for those systems who do not want to share data at all you can give them to systems where in this this particular system will only be used as for the CRM end user purposefully for the creation of records maybe you can keep that in that very system itself it will reduce your time to unlock back systems and add-on license will be required so that is that process builders we already know these are headless flows lots of information you can Club it together they are much better than that of the workflows they give you more functionalities to be exposed you can Club multiple conditions together that may be dependent on the previous conditions you can trigger them as and when I mean in one single order which is otherwise not possible with the help of workflows so yeah you can you if you use it properly and you Club it with flows it will actually help you eliminate many triggers in Salesforce so technically it’s a very fast moving very very quick developing – that will help you reduce your work if you use a thoroughly