- 15 Jun 2023
- 1 Minute to read
- Print
- DarkLight
Define subline columns as read-only
- Updated on 15 Jun 2023
- 1 Minute to read
- Print
- DarkLight
Use the Boolean Salesforce formula field in the Edit Lines modal to control whether tiered sublines and parameter sublines columns are editable or read-only.
- When you set the field to True, the column is read-only.
- When you set the field to False, the column is editable.
This feature is helpful if you want only specific users to edit specific columns.
Prerequisites
Before configuring this feature, make sure that the following fields are visible and editable:
- Read-Only Condition Field field on Subline Column object
- Read-Only Condition Field field on Line Parameter object
If the fields are not visible or editable, confirm that they are added to the object's page layout and are 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.
Create a new formula field (or use an existing one)
- Create a Boolean Salesforce formula field on the target subline object. It can be one of the following objects:
- zpl_ContractSubline_c
- zpl_DealSubline_c
- zpl_PriceLookupSubline_c
- From the Setup interface in the Salesforce 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 a subline column as read-only
For tiered pricing sublines
- From the Lightning App Launcher, go to the appropriate Product Selector Configuration.
- On the Related tab, in the Subline Columns section, select a column.
- In the Read Only Condition FIeld, specify the API name of the checkbox field you created in the previous procedure.
For parameter sublines
- From the Lightning App Launcher, go to the appropriate Line Parameter.
- In the Read Only Condition Field, specify the API name of the checkbox field you created in the previous procedure.