Use Field Values to Control a Page Display

Present a page differently to different users with page layouts, depending on the conditions you define.

One condition that you can set for a layout is based on the type of record, which your end users indicate by selecting a value from a field at runtime. For example, an open opportunity could display certain fields that a closed opportunity won't.

Control the display of page layouts this way with a special kind of choice list field, called a record type field. A record type field is a choice list field with a list of values that you specify.

Note: You can create only one record type field per object.

Create a Record Type Field

  1. In Application Composer, navigate to the object that you want to create page layouts for.

  2. Expand the object and click the Fields node.

  3. On the Custom tab of the Fields page, click Create a custom field.

  4. Select Record Type and click OK.

  5. Enter basic field attributes, such as the field display name and whether or not the field is required and updatable.

  6. Configure the list of values to display in the choice list. You can either select a predefined lookup type, or create a new one.

  7. Configure which roles have what access to particular choice list values to restrict the list of values displayed at runtime by role.

    Custom roles, which are copies of the predefined roles that Oracle provides for all customers, are displayed by default. However, you can optionally choose to display predefined roles also.

Next, add the field to the desired application page layout, where you want the field to appear. This step is described in the next section.

Create Page Layouts per Record Type

  1. In Application Composer, expand the object and select the Pages node.

  2. On the Application Pages tab, find the page layout that you want to create for a record type.

    For example, to create a page layout for an open opportunity, in the Details Page Layouts region, select the standard layout and click the Duplicate Layout icon, and then make your changes in the duplicate custom layout.

    Note: You can't add a record type condition to landing page (list page) custom layouts.

    The first custom layout that you create from a standard layout is called the default custom layout, but you can optionally change the name. Oracle recommends that you don't add conditions to the default custom layout. You can add record type conditions, and all other conditions, to subsequent custom layouts that you create.

  3. Add the record type field to the selected layout.

  4. After editing and saving the layout, select a choice list value under the Type column.

    At runtime, if an end user selects this value, then this layout appears.

    Caution: Remember that during the creation of the record type field, you can also restrict the list of values by role. If you assign a Role condition to the layout as well, then confirm that both Role conditions are complementary.

Assign a Choice List Value to Control a Page Layout Display

  1. Create a record type field for an object.

  2. Add the field to the desired application page where you want the field to appear, such as the object's creation page or details page (edit page).

  3. Assign each choice list value to a layout.

    Landing page (list page) custom layouts don't support record type conditions.

At runtime, when an end user selects a value from the field, the page display changes to match the application page layout that you associated with the field value.

Examples of Page Layouts per Record Type

Examples of page layouts that you might want to create for a record type field and its values are:

  • Only display the Closed Reason field on an opportunity, when the opportunity is closed.

  • Display different page layouts depending on the product category. For example, display different fields if the product category is a physical item, or if it's a service pack.

  • Display different page layouts depending on type of activity, such as a telephone call, task, or appointment.