- 04 Nov 2023
- 4 Minutes to read
- Print
- DarkLight
Conditionally display columns
- Updated on 04 Nov 2023
- 4 Minutes to read
- Print
- DarkLight
Use the Boolean Salesforce formula field to define visibility of columns in the Edit Lines modal. This feature is helpful when you want to show some columns only to specific users.
- When the field evaluates to True, the column is visible.
- When the field evaluates to False, the column is hidden.
Prerequisites
Before configuring this feature, make sure that the following fields are visible and can be edited:
- Header Field to Define Visible Condition field on Line List Column object.
- Line Field to Define Visible Condition field on Subline Column object.
- Line Field to Define Visible Condition on Line Parameter object.
- Header Path Single Page Visibility on Edit Prices Dialog Field object (for a single line).
- Header Path to Determine Visibility field on Edit Prices Dialog Field object (for multiple lines).
If the field is not visible or can't be edited, confirm that the field is added to the object's page layout and is visible in the user's profile. For detailed instructions on how to add fields and check for visibility, refer to Make fields visible or editable.
Conditionally display line list columns
Create a Boolean Salesforce formula field (or use an existing one)
- From the Setup interface in the customer's org, go to Object Manager.
- In the Fields & Relationships section, select New.
- In the New Custom Field dialog, in the Data Type section, select Formula (with Checkbox return type) or Checkbox, and select Next.
- In the Field Label and Field Name fields, specify a custom name of the field.
- Select Next, then select Save.
Configure conditional display of line list columns
- From the Lightning App Launcher, go to the appropriate Product Selector Configuration.
- On the Related tab, in the Line List Columns section, select the column you want to make conditionally visible.
- In the Header Field to Define Visible Condition field, specify the API name of the Boolean field you created.
- Select Save.
Conditionally display tiered pricing subline columns
You can conditionally display only custom tiered pricing subline columns. Predefined Value and Range columns are always visible.
Create a Boolean Salesforce formula field (or use an existing one)
- From the Setup interface in the customer's org, go to Object Manager and select the target object.
- In the Fields & Relationships section, select New.
- In the New Custom Field dialog, in the Data Type section, select Formula (with Checkbox return type) or Checkbox, then select Next.
- In the Field Label and Field Name fields, enter a custom name of the field.
- Select Next, then select Save.
Configure conditional display of tiered subline columns
- From the Lightning App Launcher, go to the appropriate Product Selector Configuration.
- In the Related tab, in the Subline Columns section, select the column you want to make conditionally visible.
- In the Line Field to Define Visible Condition field, specify the API name of the Boolean field you created.
- Select Save.
- The Line Field to Define Visible Condition field overrides the Visibly By Default checkbox.
- For the predefined Range and Value columns, the Visibly By Default checkbox should always be selected and the Line Field to Define Visible Condition field should either be empty or point to a field that evaluates to true.
Conditionally display parameter subline columns
Create a Boolean Salesforce formula field (or use an existing one)
- From the Setup interface in the customer's org, go to Object Manager and select the target object.
- In the Fields & Relationships section, select New.
- In the New Custom Field dialog, in the Data Type section, select Formula or Checkbox, then select Next.
- In the Field Label and Field Name fields, enter a custom name for the field.
- Select Next, then select Save.
Configure conditional display of parameter subline columns
- From the Lightning App Launcher, go to the appropriate Line Parameter.
- In the Details tab, in the Line Field to Define Visible Condition field, specify the API name of the Boolean field you created.
- Select Save.
- To hide the column by default, clear the Visibly by Default checkbox.
- The Line Field to Define Visible Condition field overrides the Visibly By Default checkbox.
- If the Line Field to Define Visible Condition field evaluates to true, the column will be visible.
Conditionally display Edit Lines columns
Create a Boolean Salesforce formula field (or use an existing one)
- From the Setup interface in the customer's org, go to Object Manager and select the target object.
- In the Fields & Relationships section, select New.
- In the New Custom Field dialog, in the Data Type section, select Formula (with Checkbox return type) or Checkbox, then select Next.
- In the Field Label and Field Name fields, enter a custom name of the field.
- Select Next, then select Save.
Configure conditional display of Edit Lines columns
From the Lightning App Launcher, go to the appropriate Product Selector Configuration.
On the Related tab, in the Edit Line Dialog Fields section, select the column you want to make conditionally visible in the Edit Lines modal.
In the Layout section, specify a numeric value for the Table Field Order in the Edit Lines modal.
ImportantIf you leave the Table Field Order field empty, the column will be always hidden.
In the Header Path to Determine Visibility field, specify the API name of the Boolean field you created.
Select Save.
NoteIf you leave the Header Path to Determine Visibility field empty, the column's visibility depends only on the Table Field Order field. If it is empty, the column is always hidden. If you specify the order, the column is always visible.