Sub topic 9
Showing external data in tabs, layouts, and list views
This chapter assumes you have already generated an external object such as Product__x with Validate and Sync, and that you know how permission sets work. Here you make that object usable in the Salesforce UI.
What users see by default
Validate and Sync creates the external object, but it does not add it to any navigation. Users can't find it until you expose it through three pieces of metadata: a tab, a page layout, and a list view. Each piece needs the access granted in the previous chapter. Without object and field permissions, the tab and its records stay hidden.
Every time a user opens a list view or a record page, Salesforce Connect sends a request to the external system. The UI shows current data, but it is only as fast as that system.
Creating a tab
A tab is the entry point in the navigation. To create one:
- In Setup, enter
Tabsin Quick Find and select Tabs. - In the External Object Tabs section (or the Custom Object Tabs section in some orgs), click New.
- Choose the external object, pick a tab style, and save.
- Add the tab to the relevant profiles or apps.
In Lightning Experience, add the object to an app through the App Manager. Choose the app, open Navigation Items, and move the external object into the selected list.
Page layouts
An external object has a default page layout. It lists the fields that Validate and Sync created. You can edit it in the same way as a custom object layout.
- Remove fields that users never need. Each field shown on a record page is part of what the external system must return.
- Add related lists for child external objects when you have defined external lookup relationships. The next chapter covers these.
- Remember that
ExternalIdandDisplayUrlare standard fields.ExternalIdidentifies the row.DisplayUrlis the link back to the record in the source system. PutDisplayUrlon the layout only if users benefit from jumping to the source.
Layouts for external objects are read-only unless the data source is writable. Edit and delete buttons appear only when writes are enabled.
List views
A list view is the main way users browse external rows. Create one from the tab. Choose the filter criteria, the visible fields, and the sort order.
Salesforce Connect turns the filters into a query against the external system. This has two effects:
- Filters on fields that the external system can't filter efficiently produce slow requests, or the system may return an error.
- The number of rows shown per page and the sort order are applied by the external system or by Salesforce, depending on what the adapter supports.
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
| The tab is missing from the app | The tab is not assigned to the profile, or not in the app's navigation items | Assign the tab and add it to the app |
| The tab opens but shows no rows | Missing object or field permission, or the external system returns no data | Check the permission set, then test the query in Developer Console |
| The list view loads slowly or times out | Broad filter or too many columns | Add a selective filter and remove columns |
| A field is blank on the record page | No field permission, or the field was not synced | Grant field access or run Validate and Sync again |
Checking the result
After setup, log in as a test user with only the permission set you built. Open the tab, load a list view, and open a record. If the page works for that user, access is configured correctly. If it only works for an admin, a permission is missing.
Exercise
A user can see the Product_x tab, but a record page shows no value in the Price_c field. The field is on the page layout and the value exists in the external system. What do you check first?
Show answer
Check whether the user's permission set grants field-level read access to Price_c. A field on the layout stays blank without that permission. If access is granted, check that Price_c was included in the last Validate and Sync.