Salesforce Tips: Setting Up External Objects Made Easy

Salesforce Tips: Setting Up External Objects Made Easy

How to Setup External Objects in Salesforce?

 

1. Set Up Salesforce Connect

Before creating External Objects, you need to set up Salesforce Connect:

  • Enable Salesforce Connect: Go to Setup > Salesforce Connect and follow the steps to enable it.
  • Choose an Adapter: Salesforce Connect supports several adapters, such as OData and custom adapters. OData is commonly used and can be configured in Setup > External Data Sources.


2. Configure External Data Source

1. Create an External Data Source:

  • Go to Setup > External Data Sources.
  • Click New External Data Source.
  • Choose the type of external data source (e.g.OData 2.0, OData 4.0).
  • Enter the necessary connection details (URL, authentication, etc.).

2. Validate and Sync:

  • Click Validate and Sync to fetch metadata from the external data source. This process will create the external objects in Salesforce based on the data source.


3. External Objects:

  • External objects are similar to custom objects, except that they map to data that’s stored outside your Salesforce org.
  • Each external object relies on an external data source definition to connect with the external system’s data
  • Each org can have up to 200 external objects. External objects don’t count toward the amount for custom objects.



i) External Object Relationships:

External objects support standard lookup relationships, which use the 18-character Salesforce record IDs to associate related records with each other. However, data that are stored outside your Salesforce org often doesn’t contain those record IDs. Therefore, two special types of lookup relationships are available for external objects: external lookups and indirect lookups. See ”External Object Relationships” in the Salesforce Help for details.

ii) Creating New External Objects:

Follow these simple steps to start creating new external objects:

1. Navigate to Setup.
2. Locate the Quick Find box and type External Objects. Click on the External Objects options that will appear.
3. Select New External Object.
4. The following fields will appear. Fill them out with their corresponding data:

    • Label
    • Plural Label
    • Starts with a vowel sound
    • Object name
    • Description
    • Context-Sensitive Help Setting
    • Content Name
    • External Data Source
    • Table Name
    • Display URL Reference Field
    • Allow Reports
    • Deployment Status
    • Allow Search


Some of these fields are optional, and some might not be appropriate for the external data source. Fill out these fields according to the external object data source that’s being used.

  • Hit Save once done with the fields.


The new external object is now created. The external object’s detail page will appear. Here, a user can view and modify fields, create mappings, and assign page layouts for the org’s users.


4. Set Up Data Access

  • Define Permissions: Ensure that users have the appropriate permissions to access the external objects. You may need to adjust profiles or permission sets to grant access.

  • Configure External Data Source Settings: If your external data source requires special configurations, such as custom authentication or data filters, make sure these settings are correctly configured.


5. Test and Validate

  • Test Data Access: Perform tests to ensure that data from the external source is correctly displayed in Salesforce. Verify that queries and data retrieval are functioning as expected.

 

6. Use External Data in Salesforce

  • Create Reports and Dashboards: Use external objects in Salesforce reports and dashboards to analyze and visualize data from the external source.

  • Integrate with Other Features: External objects can be integrated with other Salesforce features, such as Apex code, workflow rules, and custom applications.

 

7. SOQL Considerations for Salesforce Connect

  • Each SOQL query can have up to 4 joins across external objects and other types of objects.
  • External objects don’t support the following aggregate functions and clauses.
  • AVG() function
  • COUNT(fieldName) function (however, COUNT() is supported)
  • HAVING clause
  • GROUP BY clause
  • MAX() function
  • MIN() function
  • SUM() function

 

8. Page Layout Limit for External Object

  • You can’t rename a page layout if you’re using Salesforce Professional Edition.
  • In Lightning Experience, page layouts support up to 55 lookup fields. In Salesforce Classic, page layouts support up to 40 lookup fields.

 
Summary

Salesforce uses Objects to store data, including standard ones like Accounts, Contacts, Opportunities, and Cases that come with the Salesforce Clouds. Custom Objects can be added to track specialized information such as Projects and Timesheets. Salesforce Connect introduces External Objects as an additional type.

External Objects operate in a similar way to Standard and Custom Objects, but they do not contain data directly within Salesforce. Instead, the data is held in external platforms like SAP, Workday, or Amazon. Salesforce Connect uses OData endpoints—a widely accepted standard for RESTful APIs—to pull information from these external sources and create metadata for External Objects in Salesforce.

 

Contact Us

We would love to hear from you Please feel free to send us a message via the form