# Internal data sources

**Internal DataSources are used when you want to look up related objects in Salesforce to present data together.**

For example, if the Lookup object is specified as 'Product2' and you want to display the unit price from a 'PricebookEntry', you can use an internal data source to look up the 'PricebookEntry' that meets the criteria, and display the product and unit price together.

* [**Properties**](#properties)

  Describes each property of Internal data sources.
* [**Action**](#action)

  To combine data from a data source with the list, you must map the fields from the data source to fields in the list (you can create virtual fields to hold these values).
* [**Example**](#example)

***

### Properties

<figure><img src="/files/0cOEV5QfMUS0wRotZP7c" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/suouiJA6M1LprhXS1dpl" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="173">Field name or area</th><th width="397">Description</th><th>Req.</th></tr></thead><tbody><tr><td>Object search</td><td>Search for and select the target object in the data source.</td><td><mark style="color:red;">✔️</mark></td></tr><tr><td>Enable</td><td>Enables the data source. You will not be able to use disabled data sources when builfing custom lists.</td><td></td></tr><tr><td>Description</td><td>Provide a description of the datasource.</td><td></td></tr><tr><td>Conditions</td><td>Create if you need to apply a condition when looking up objects in the data source (equivalent to a <code>Where</code> clause in SOQL).<br>It may be easier to write your search query if you use the <strong>Field API Name Finder</strong> to find the appropriate field names.<br><br><span data-gb-custom-inline data-tag="emoji" data-code="26a0">⚠️</span>When writing conditional statements using fields from the underlying object, be sure to use 'IN', not '='.<br><code>$Current</code> means the list's underlying object.<br>Correct example: <code>Product2Id IN {$Current.Id}</code><br>Incorrect example: <code>Product2Id = {$Current.Id}</code></td><td></td></tr><tr><td><a href="#action"><strong>Actions</strong></a></td><td>To use data from a data source in a custom list, you need to map the data source fields to the columns in the list (you can use the virtual fields you set up earlier for this).</td><td><mark style="color:red;">✔️</mark></td></tr></tbody></table>

### Action

To use data from a data source in a custom list, you need to map the data source fields to the columns in the list (you can use the virtual fields you set up earlier for this).

<figure><img src="/files/I60FDr9EOtlhctpHZisV" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="166">Field name or area</th><th width="353">Description</th><th>Req.</th></tr></thead><tbody><tr><td>Key</td><td>To match records in your data source with records in your list, select a key field to match records on.</td><td><mark style="color:red;">✔️</mark></td></tr><tr><td>Actions</td><td>These map the data retrieved from the data source to the columns in your list.</td><td><mark style="color:red;">✔️</mark></td></tr><tr><td><a href="#add-action"><strong>Add Action</strong></a></td><td>Click this button to add an Action.</td><td></td></tr></tbody></table>

#### Add Action

<figure><img src="/files/gbim9ioVL8KFC60cpPlK" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="187">Area</th><th>Description</th></tr></thead><tbody><tr><td>DataSource Field</td><td>Shows the fields available in the object specified in the data source.</td></tr><tr><td>Lists Field</td><td>Shows the fields available in the object specified in the list.</td></tr><tr><td>Virtual Field</td><td>Shows the virtual columns you created in the list.</td></tr><tr><td>Results</td><td>Shows the results of which fields to map from the data source (on the left) to the custom list (on the right).</td></tr></tbody></table>

### Example

You want to retrieve a list of products, so you specify the underlying object of the list as Product. You also want to display the list with the unit prices stored in the PricebookEntry object.

1. Click the :heavy\_plus\_sign: button to search for and select `PricebookEntry`.
2. (optional) In the Condition field, enter `Product2Id IN {$Current.Id}` (equivalent to a SOQL `Where` statement).
3. To match the PricebookEntry data to the Products, click the pencil button to the right of the Key row.
4. In the pop-up window that opens, choose the following options and save:
   * Data source field: Product2Id
   * List field: Id
5. Press the `Add Action` button to display the unit price of the PricebookEntry in the list column. Note that before completing this step you must have created a virtual column in the Datatable Setup screen as described above.
6. In the pop-up window that opens, choose the following options and save:
   * Data source field: UnitPrice
   * List field: SBLDVirtual1 (or whichever name you chose)

<figure><img src="/files/Jjg9G2oj6lmzTUqFFPZz" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.smallbuilder.com/smallbuilder-lists/setup/datasource-setup/internal.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
