External Objects in Salesforce - The Implementation Guide
External Object is a kind of virtual object which does not exist in your Org. It is a custom object like other custom objects we can use in visualforce, apex, SOQL,SOSL, and custom tabs.
In Salesforce, Only API version 32.0 and later version supports external objects. External objects are available with Salesforce Connect and Files connect.
External objects are used when you have a large amount of data that you don’t want to store in Salesforce org, and you only need small amounts of data at one time. It is also used when we want to fetch data from the external repository with the[e help of Salesforce connect in real-time without saving the data in Salesforce org.
Use Case for the External Object:
- By using an external object, you can access the large amount of data that you don’t want to copy into Salesforce org.
- We can access an external object and fetch the data from the external system in real-time.
- It provides a live connection to external data rather than a copy that consumed storage and must be regularly synced.
Follow these steps to access one Salesforce org data in another Salesforce org in real-time with the help of external objects.
Step 1:
- Log into the Heroku account. Click on the Create New App button.
- Enter the App name and region for the App. After filling in details, click on the create app button.
Step 2:
- Click on ‘Resources’.
Step 3:
- Search Heroku Connect Add-on. Then select Heroku Connect.
Don't forget to check out: Aggregate Functions in Salesforce - The Developer Guide
Step 4:
- Select Plan Name then Click on the Provision.
Step 5:
- Click on the Heroku Connect Ad-on for the Setup Connection.
- Click on the Setup Connection.
Step 6:
- Enter Schema's name and database (Where you want to bring data).
- Click on the Add a database now.
- Click on Install Postgres now.
- Select your app and click on Provision add-on.
- After adding the database, click on the Next button.
- Select the Environment and API version. Then click on the Authorize button.
- Enter your Username and password.
- Click Allow. After Allowing the access it shows the page below.
Step 7:
- Go to the Mappings section.
- Click on Create Mapping.
- Select the object according to your requirement.
- Click on Save
After successfully mapping, It shows the below page.
Check out another amazing blog by Shweta here: An Introduction to Salesforce Service Cloud
Step 8:
- Go to the Explore section to see the org data.
Step 9:
- Go to the External Object tab and click on Create credentials.
- When we can Click on the Show credentials button we can see the Username and Password. Copy the Server Url and select Data Sources (Choose those tables you want to view).
Step 10:
- Log in to the Salesforce org.
- Go to SetUp → Enter External Data Source in Quick find box → Select External Data Sources → Click on the New External Data Source button.
- Enter External Data Source and Name. In the Type section, Select Salesforce Connect: OData 4.0
- In Url, Paste the Server Url from the External Object Dashboard and Enable Writable External Object, if you want to read/write access.
- In Identity Type, Select Named Principal. And in Authentication Protocol, select Password Authentication. Enter the Username and Password from the External Object Dashboard.
- After inserting all the details, click on the Save button.
Step 11:
- Click on the Validate and Sync button.
- Select the Table and click on the Sync button.
Looking for the Top Salesforce Consultants? Choose the best from here.
Step 12:
- Go to Setup → Enter Tab in quick find box → Select Tabs → Click on New Button under Custom Object tabs.
- Click on the Next and Save button.
Responses