Related Object Subtabs

A related object subtab lists records from one object that's related to another object.

What does it mean when an object is related to another? A relationship is a foreign key association between two objects. Using Application Composer, you can create a one-to-many or many-to-many relationship between two objects. This is helpful because if a relationship exists, then you can expose the "many" object records on a subtab that's displayed on the "one" object's details page. This is useful for your users.

For example, your users might want to associate an account with a list of service requests that have been logged for that account. To enable this, you must first create a one-to-many relationship between the account and service request objects. (An account can have multiple service requests associated to it, and a given service request can have one and only one account associated with it.) Then, you can add the Service Requests subtab to the Account details page. At runtime, when your users review a particular account record, they can see all the service requests that have been logged for that account. And, depending on how you configure the subtab, they can also create new service requests, add existing service requests, or remove service requests from the subtab.

To add a related object subtab to an existing details page:

  1. From any custom details page layout, click the Add icon, which displays under the existing subtabs while editing the layout.

  2. Select Related object, then Next.

    This is a screen shot of the Create Subtab page, where you configure a new subtab for a related object
  3. On the Create Subtab page:

    1. Select the related object that's to be exposed on the subtab, and enter the subtab display label.

      The list of related objects includes those objects that:

      • Are already related to the current object, with any type of one-to-many or many-to-many relationship, either custom or standard.

        For example, if you previously created a one-to-many reference relationship, then you will see the "many" object in the data object list when creating the subtab for the "one" object's details page.

      • Don't yet have a subtab.

      After the subtab is created, you won't be able to create a second subtab for that same "many" object again.

    2. Specify the drill down column. The drill down column is the field that you want your end users to click to drill down to more details about the related object record.

      If you're creating a subtab for a custom object, then the Drill Down Column field might not appear if you haven't yet created the custom object's application UI pages. To display the Drill Down Column field, you must first create the application UI pages for the custom object, sign out, and then sign back in.

    3. Specify a display icon for the subtab.

    4. Select which fields you want to display on the subtab summary table at runtime.

      When selecting the fields for display on a related object subtab, join fields are not available for selection if the relationship is a many-to-many relationship.

    5. Configure the default search setting that applies to this subtab. This setting applies to all existing details page layouts with this subtab.

      When configuring the default search setting, only intersection fields are available for selection if the relationship is a many-to-many relationship. See "Adding Default Search Criteria to Subtabs" in the Overview of Subtabs topic.

    6. Configure the default sorting field and its order, either Ascending or Descending.

    7. Optionally hide the Create, Add, and Remove buttons that appear on the subtab at runtime.

      In a related object subtab, your users can use these buttons at runtime to:

      • Create a related object record and associate it to the current record at the same time.

        Note: This button is available only for subtabs in application pages.
      • Add an existing related object record to the current record.

      • Remove a related object record from the subtab. This removes the association between the related object record and the current record.

    8. (Application UI only) If more than one details page layout exists, then click Next to optionally select other details page layouts that will display this subtab.

    9. Click Save and Close.

Add a Related Object Subtab to A Details Page

This example illustrates how you add a related object subtab to a application details page.

This example covers the following:

  1. Creating a related object subtab.

  2. Verifying the addition of the subtab.

1. Create a Subtab

In this step, you create a related object subtab using the Sales Lead object to display fields from the Opportunity object.

For more information about creating subtabs, see Overview of Subtabs.

To create a subtab:

  1. Navigate to Application Composer.

  2. Under the Standard Objects tree, expand the Sales Lead object.

  3. Click the Pages node.

  4. Select the Application Pages tab.

  5. Under the Details Page Layouts region, select the page layout that you want to edit. In this example, select the standard layout and click the Duplicate Layout icon to make a copy of it to edit.

  6. On the Edit Layout page, select the plus icon in the subtabs region.

  7. On the Create Subtab page, select the Related object option.

  8. Click Next.

  9. Specify the values for the fields as follows:

    Field Label

    Select or Enter

    Description

    Data Object

    Opportunity

    The object that this subtab is based on. This subtab will display a list of opportunities that are related to a sales lead.

    Display Label

    Opportunity Name

    Name of the subtab.

    Drill Down Column

    Opportunity Name

    Your users will click this column to drill down to view more details about an opportunity record.

    Display Icon

    As applicable

    This icon appears on the application page as the subtab icon.

    Selected Fields

    As applicable

    The fields that you want to appear on the subtab.

  10. Save the Opportunity Name subtab.

    You have created a subtab to display opportunities on a subtab which appears on the Sales Lead details page. To view the new subtab, use the Navigator to view the Leads set of pages, and edit a sales lead record.

2. Verify the Addition of the Subtab

  1. Using the Navigator, select Leads.

  2. Click a lead to open the Edit Lead page.

    The Opportunity Name subtab appears along the left side, with all the other subtabs.

You have now verified the addition of the subtab.