---
schema_version: "1"
id: ff66423b7800fd7902c7cd945710d3249d21dd54e89a04beab81755a55d27e83
title: Retrieving Data with Page Data Connections
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/siteforce_data_page_connection.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.siteforce_data_page_connection.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: a86f30e35b06e85996ce3dfa52526a8b60ebc91decf2df37fb9dadfc655ded93
description: Use a page data connection to create a detail page for a single record when working with Salesforce objects.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# Retrieving Data with Page Data Connections

Use a page data connection to create a detail page for a single record when working with Salesforce objects.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition">
        <colgroup>
          <col>
        </colgroup>
        <tbody>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">Available in: Salesforce Classic</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">
              <p>Available for purchase in: <strong>Enterprise</strong>, <strong>Performance</strong>,
                and <strong>Unlimited</strong> Editions</p>
              <p style="margin-bottom:0;">Available (with limitations) in:
                <strong>Developer</strong> Edition
              </p>
            </td>

          </tr>
        </tbody>
      </table> <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d146405e74">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d146405e74 ">To build, edit, and manage Site.com
              sites:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d146405e74 ">
              <p><samp class="parmname">Site.com Publisher
                  User</samp> field enabled on the user detail
                page</p>
              <p>AND</p>
              <p style="margin-bottom:0;">Site administrator or designer
                role assigned at the site level</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d146405e74 ">To edit the guest user profile:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d146405e74 ">
              <p><samp class="parmname">Site.com Publisher
                  User</samp> field enabled on the user detail
                page</p>
              <p>AND</p>
              <p>Site administrator or designer
                role assigned at the site
                level</p>
              <p>AND</p>
              <p>Manage Profiles and
                Permission Sets</p>
              <p>AND</p>
              <p style="margin-bottom:0;">Customize
                Application</p>
            </td>

          </tr>
        </tbody>
      </table>

When combined with data elements, custom code, or content blocks, page data connections let you connect to standard and custom objects, retrieve a specific record, and dynamically display the returned data anywhere on the page. You can even use expressions to access the returned data in the page's properties.

When the page is open:

1. Ensure that the page is selected in the Page Structure pane.
2. Click **Add Connection** in the Page Data Connection section of the Properties pane.
3. Select the object that you want to connect to.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_note.png)
    
    Note
    
    - For Site.com users, the drop-down list only displays objects that are available to guest users because site visitors access your public site via the Guest User license. To make other objects available, go to the [guest user profile](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_access_perms.htm&release=264.0.0&type=5 "Sites built with Site.com are publicly available, so visitors access the site via the Guest User license that's associated with the site."), enable the relevant object's “Read” permission, and refresh the list.
    - For Communities users, the drop-down list displays objects that may not be available to site visitors. For authenticated visitors, object access on public and private pages is controlled by their user profiles. For unauthenticated visitors, object access on public pages is controlled by the site's guest user profile.
4. Optionally, in Filters, select criteria to filter which record is returned. If you don't select any criteria, the first record is returned by default.
    
    1. Select the field to which the filter criteria apply. The Field drop-down list displays the object's fields, followed by the fields of all parent objects, which use the format parent\_object\_name.field\_name.
    2. Select [the operator](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_operators.htm&release=264.0.0&type=5) to control how results are filtered. For example, select Equals to return an exact match.
    3. Select [the source](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_operators.htm&release=264.0.0&type=5) of the filter value. For example, to specify an explicit value, select Fixed value, or to use the values passed to the page via a query string, select URL query string.
    4. Set the value of the filter. If you're using a query string, you can also specify what should happen if the query string is missing.
    5. Add additional filter criteria as required to narrow your results further. Each filter item is combined with an AND operator.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_note.png)
    
    Note If you're using a fixed value to filter the results, you can view the returned records in the Connection Preview section. To refresh the list of records, click **Reload Preview**.
5. In Sorting, you can specify whether to sort the results by one or more fields in ascending or descending order.
    
    For example, say you want to create a page that displays the most popular movie. You could connect to a custom object that contains movie data, and instead of using filter criteria, you could sort by user rating in descending order. Because a page data connection returns a single record, only the highest rated movie is returned.
6. Click **Save**.

Next, you must add either [data elements](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_repeater_element.htm&release=264.0.0&type=5 "You can use a data element to display the data retrieved by a page data connection or a data repeater. The data element binds to a field in the object and acts as a placeholder that's replaced with the field's data when the page loads."), [custom code](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_code.htm&release=264.0.0&type=5 "In addition to data elements and content blocks, you can also use custom code as an alternative way to display data in a data repeater or in a page data connection. It's particularly useful for displaying field data that's inline with text."), or [content blocks](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_content_block.htm&release=264.0.0&type=5 "In addition to data elements and custom code, you can also use content blocks as an alternative way to display data in a data repeater or in a page data connection. It's particularly useful for displaying field data that's inline with text.") to the page to display the retrieved record data.

You can use expressions to access the returned data anywhere on the page, including the page's properties. For example, let's say you want to use the account name as the title of the Account Detail page. In this case, you would simply enter {!Name} in the Title field on the Properties pane. When the page loads, it retrieves the account name for that particular record and displays it in the browser's title bar.

#### See Also

- [Page Data Connections Overview](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_page_overview.htm&release=264.0.0&type=5 "Page data connections make it easy for site administrators and designers to create a detail page for a single record when working with Salesforce objects.")
- [Improve Performance Using Caching](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_caching.htm&release=264.0.0&type=5 "When working with data-bound page elements, such as data repeaters, data tables, and data functions, you can improve the performance and page rendering of your website using caching. Caching controls how often a page containing a data connection requests data from Salesforce.")
- [About Displaying Dynamic Data Using Expressions](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_merge_fields.htm&release=264.0.0&type=5 "Site.com uses expression language to display data dynamically. Expressions serve as placeholders for data that is replaced with information when the page loads. When working with data-bound page elements or custom widget properties, you can use expressions to customize how data is displayed on the page.")
- [Data Filter Examples](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_repeater_examples.htm&release=264.0.0&type=5 "When working with data repeaters, data tables, and data functions, you can filter the data you retrieve in many ways. In this topic, we explore two options— fixed values and URL query strings—to illustrate some common filtering techniques.")