Tuesday 23 June 2015

One thing you must know about Junction Objects in Salesforce

Hi Devs, Here I brought-up some thing new I hope in very common topic Junction Object In Salesforce. 

So what I am talking about here is when we setup junction object and go to any of the master record and see related of detail records then there will not be edit link in front of record in the list until unless we have one custom field over that detail object. 

Let's take a example. I have two custom Objects Master1, Master2 now I am going to create one junction object under Master1 and Master2.
                       











When I visit Master1 record then I observe that edit link is not there
                       

but if I view that junction record separately then I have Edit button on junction record page.
                                     

So Here is the reason as I create a editable custom field on junction object

                                  

"Edit" liks gets appeared in the related list but it is not necessary to keep that field on layout keep it behind the screen.
                                     

Sunday 21 June 2015

Lightning Connect


Its a time to connect salesforce to other system for data perspective then easiest option provided by Salesforce is lighting connect. 
It connects and access data from external sources with point-and-click simplicity. It Incorporate data from legacy systems (SAP, Oracle, Microsoft, etc.) in real time in Salesforce application objects. 

How to set-up : 
There are two type of entities which need to setup in order to work on lightning connect. 
1. External Data Source 
2. External Object 

Goto Setup>Build>External Data Source and Create a new External Data Source which will keep reference of an external hosted data source. 

1. Select option "Lightning Connect: OData 2.0" then Salesforce connect to external data server. The external data must be exposed by a service that uses Open Data Protocol (OData) Version 2.0. Such a service is called 
an OData producer.               


2. Select identity Type "Anonymous" then no authentication is required but if you select other option than it will ask authentication from different ways like Oauth2.0, password authentication. 
In my example I have put one OData supported data and then select Anonymous identity types and put URL with 
http://services.odata.org/V2/(S(z03hdcomixoupwtkwk3as00w))/OData/OData.svc/ 
After creating this external Data Source, we need to create External Object. For this I have clicked on Validate and Sync button and I was redirected to next screen where I found table with option to select object data I wanted to inherit. Once I select object and click on Sync option, external Object got created.

Here I have selected two objects "Categories" and "Products" so resulting two external objects have been created.


These External objects can not be modified within Salesforce but these synced with external system. 


we can read the data either via visiting record file or applying SOQL. This data does not count against Salesforce storage limit. 
Here is data :