Detail Page Layout and Dynamic Tabs

The detail page of a document consists of Steps and Tabs. You define them in a JSON configuration on the document type.

Most document types have an out-of-the-box layout, so their detail page works without any configuration. You can change this layout. For example, you can add a tab with a dashboard that shows historical data of the customer. For Custom Forms, you always define the Steps and Tabs yourself.

Steps, Tabs and Widgets

layout dynamic tabs.drawio
Figure 1. Model of the detail page layout
  • Step – A sub-screen of the detail page. A Step contains one or more Tabs. Some document types support only one Step.

  • Tab – One section of a Step. Each Tab shows one Widget.

  • Widget – The content of a Tab. For example, the line items, the workflow, the attachments or a custom dashboard. See Widget Types.

Availability and Layout Types

Each document type uses one of two layout types: DynamicTabs or DetailLayout. The layout type is predefined, you cannot change it. You place the JSON configuration in the configuration field of the document type.

Document type

Layout type

Configuration field of

Available since

Quotes

DetailLayout

Quote Type (QTT)

8.1

Rebate Agreements

DetailLayout

Rebate Agreement Type (HRT)

8.1

Compensation Plans

DetailLayout

Compensation Header Type (COHT)

9.0

Custom Forms

DynamicTabs

Custom Form Type (CFOT)

9.0

Agreements & Promotions

DetailLayout

Contract Header Type (CTHT)

10.0

Action Items

DynamicTabs

Action Item Type (AIT)

11.1

The two layout types differ in the following capabilities:

Capability

DynamicTabs

DetailLayout

Supports Steps

Yes

No

Supports Tabs

Yes

Yes

Tabs can be hidden dynamically

Yes

Yes

Rendering

Steps are rendered horizontally and Tabs vertically by default. You can change this with the layout property.

Tabs are rendered horizontally.

Configure the Layout

The configuration is a JSON object. It contains either a tabs array or a steps array with tabs inside, never both.

Property

Description

name

Required. Informative text that describes the configuration.

tabs

Array of Tabs. Use it when the page has no Steps.

steps

Array of Steps. Each Step has a name and its own tabs array. Supported by DynamicTabs only.

layout

Rendering of Steps and Tabs. Accepted values: auto, stepper, tabs, menu, wizard. The default is stepper for a configuration with Steps and tabs for a configuration with Tabs only.

buttons

Controls the visibility of action buttons. Each key is a button name. Each value is a boolean or a filter.

parameters

Document-level settings, for example the Activity Log settings or the generation of rebate records.

preferences

Predefined preferences for the items table and the customer and product pickers.

Each Tab supports the following properties:

Property

Description

name

Required. Unique name of the Tab. The name can appear in the URL, so use URL-safe characters only.

type

Required. The Widget that the Tab shows. See Widget Types.

translationKey

Key of a built-in translation for the Tab label. See Translation Keys. If no translation exists for the key, the key itself is displayed.

labelTranslations

Custom labels per language. See How to Translate Tab Labels in Dynamic Tabs.

icon

Icon of the Tab or Step. See Dynamic Tabs Icons.

typeReference

Unique name of the dashboard or logic, for Widgets that need one.

parameterMapping

Maps document fields to the inputs of the dashboard. The key is the dashboard input name, the value is the document field name.

parameters

Static parameters of the Widget. See Widget Parameters.

hiddenCheck

Filter that hides the Tab. See Hide or Disable Tabs Conditionally.

disableCheck

Filter that disables the Tab.

userGroupViewDetails

Comma-separated list of user groups that can view the Tab.

userGroupEdit

Comma-separated list of user groups that can edit the Tab.

The JSON Schema describes the full syntax and all options:

The following configuration matches the out-of-the-box layout of a Quote:

JSON
{
  "name": "Default configuration for CLIC",
  "tabs": [
    {
      "name": "header",
      "translationKey": "sfdc_entity_tabs_header",
      "type": "header"
    },
    {
      "name": "items",
      "translationKey": "sfdc_entity_tabs_items",
      "type": "items"
    },
    {
      "name": "attachments",
      "translationKey": "sfdc_entity_tabs_attachments",
      "type": "attachments"
    },
    {
      "name": "workflow",
      "translationKey": "sfdc_entity_tabs_workflow",
      "type": "workflow"
    },
    {
      "name": "workflow-history",
      "translationKey": "sfdc_entity_tabs_workflowHistory",
      "type": "workflowHistory"
    },
    {
      "name": "messages",
      "translationKey": "sfdc_entity_tabs_messages",
      "type": "messages"
    },
    {
      "name": "activities",
      "translationKey": "unity_activity_log_title",
      "type": "activityLog"
    }
  ]
}

To add a dashboard Tab, add a Tab of the dashboard type:

JSON
{
  "name": "customerInsights",
  "type": "dashboard",
  "typeReference": "CustomerInsights_CustomerDetailView",
  "parameterMapping": {
    "Customer": "customerId",
    "Time Filter": "L12M"
  }
}

Widget Types

The type property of a Tab accepts the following Widgets:

Widget

Description

actions

List of actions to do.

activityLog

History of the activities on the document. See Activity Log Configuration.

attachments

List of attached files. Users can add files.

configurationWizards

The specified Configuration Wizard.

customForms

The specified embedded Custom Form.

dashboard

The specified dashboard. Set the dashboard in typeReference.

details

Details of the document.

documents

Links to related documents. In Custom Forms until version 11.3, this Widget also shows the attachments. Since version 12.0, it shows only the documents. To keep the old behavior in migrated partitions, use the customFormUseMultiTabDocuments advanced configuration option.

externalApp

An external application in an iframe.

header

The document header, for example the Quote header.

items

The line items of the document, for example the Quote line items.

messages

Messages between the users who work on the document.

notes

Notes about the document.

other-items

In the review step of a creation workflow, the line items that other users review.

records

Rebate Records and Rebate Record Groups generated from the Rebate Agreement line items.

visualConfiguration

The Formula Designer (visual formula configurator). Supported by Custom Forms.

workflow

The approval workflow with its steps.

workflowHistory

The history of the approval workflow.

Supported Widgets by Document Type

Each document type supports only some Widgets:

Widget

Quote

Agreements and Promotions

Rebate Agreements

Compensation Plan

Custom Form Standalone

Action Item

Price Lists, Live Price Grids

customForms

yes

yes

yes

yes

yes

yes

-

dashboard

yes

yes

yes

yes

yes

yes

-

messages

yes

yes

yes

yes

yes

yes

-

notes

yes

yes

yes

yes

yes

yes

-

documents

yes

yes

yes

yes

yes

yes

-

attachments

yes

yes

yes

yes

yes

yes

yes

actions

yes

yes

yes

yes

yes

-

-

workflow

yes

yes

yes

yes

yes

-

-

workflowHistory

yes

yes

yes

yes

yes

-

-

header

yes

yes

yes

yes

-

-

-

items

yes

yes

yes

yes

-

-

yes

externalApp

yes

yes

yes

yes

-

-

-

details

-

-

-

-

yes

yes

-

configurationWizards

-

-

-

-

yes

yes

-

records

-

-

yes

-

-

-

-

Widget Parameters

Some Widgets accept parameters in the parameters property of the Tab. Most of them configure the Details & Settings panel. See How to Configure the Details & Settings Panel for details and examples.

Widget

Parameter

Description

details

renderOutputsAs

Set to inline to show complex results, for example charts, directly instead of as a link. The default is table. See Display Outputs Expanded.

items

renderOutputsAs

The same as for the details Widget.

items

hideSiderPanel

Set to true to hide the Details & Settings panel. Only the items table is displayed.

items

flexibleLayout

Set to true to allow users to move the Details & Settings panel between the right side and the bottom of the screen.

items

defaultPlacement

Initial position of the Details & Settings panel. Accepted values: right, bottom.

items

siderAlwaysWithTabs

Set to true to always show the panel content in tabs, never side by side. See Disable Displaying All Tabs at Once.

header, items

showOutputsAfterRecalculation

Set to false to stay on the current tab after recalculation, instead of switching to the Calculations tab. See Do Not Switch to Calculation Tab After Recalculate.

header, items

expandSiderAfterRecalculation

Set to false to keep a collapsed Details & Settings panel collapsed after recalculation.

items

keepSelectionAfterRecalculation

Set to true to keep the selected items selected after recalculation. Available since version 17.0.

header

siderTabs

Order and visibility of tabs in the Details & Settings panel. Available since version 17.3. See Change the Order of Tabs and Hide Tabs.

items

siderTabsHeader, siderTabsItems, siderTabsFolders

Order and visibility of tabs in the Details & Settings panel when no line item, a line item or a folder is selected. Available since version 17.3. See Change the Order of Tabs and Hide Tabs.

Example of a details Tab with a parameter:

JSON
{
  "name": "details",
  "type": "details",
  "parameters": {
    "renderOutputsAs": "inline"
  },
  "translationKey": "dynamicTab_details"
}

Hide or Disable Tabs Conditionally

Use hiddenCheck to hide a Tab and disableCheck to disable it. Both take a filter. The filter is compared against the data of the document. When the document matches the filter, the Tab is hidden or disabled. Steps support the same properties.

In the following example, the Workflow tab is hidden while the planStatus field has the value DRAFT or OFFER:

JSON
{
  "name": "workflow",
  "type": "workflow",
  "translationKey": "sfdc_entity_tabs_workflow",
  "hiddenCheck": {
    "operator": "and",
    "criteria": [
      {
        "fieldName": "planStatus",
        "operator": "inSet",
        "value": [
          "DRAFT",
          "OFFER"
        ],
        "_constructor": "AdvancedCriteria"
      }
    ],
    "_constructor": "AdvancedCriteria"
  }
}

For the supported operators and more examples, see How to Use Advance Filter Criteria on Dynamic Tabs.

Translation Keys

Use the following built-in keys in translationKey. Where two keys exist, both show the same label.

Tab

Translation key

Alternative key

Header

sfdc_entity_tabs_header

sfdc_quotes_tabs_header

Items

sfdc_entity_tabs_items

sfdc_quotes_tabs_items

Items for review

common_items_for_review

–

Other items

common_items_other

–

Attachments

sfdc_entity_tabs_attachments

sfdc_quotes_tabs_attachments

Workflow

dynamicTab_workflow

sfdc_entity_tabs_workflow

Workflow History

sfdc_entity_tabs_workflowHistory

sfdc_quotes_tabs_workflowHistory

Messages

dynamicTab_messages

sfdc_entity_tabs_messages

Activity Log

unity_activity_log_title

–

Rebate Records

main_rebateRecordsTitle

–

Actions

dynamicTab_actions

–

Notes

dynamicTab_notes

–

Dashboard

dynamicTab_dashboard

common_dashboard

Documents

dynamicTab_documents

–

Details

dynamicTab_details

–