Editable or deletable lines and columns
  • 05 Oct 2023
  • 3 Minutes to read
  • Dark
    Light

Editable or deletable lines and columns

  • Dark
    Light

Article summary

By default, all lines on a deal are editable and deletable. You can control the status of certain lines for a user. For example, you will see all product type lines but you won't be able to edit the lines of a Type = “Carpet” product.

  • If your business logic is complex, you can use a custom Apex hook. For more information, see Line Items Operations Configurer.

  • You can use both a filter and an Apex hook to define the status of a line. If you do this, the results of both approaches must evaluate as TRUE for it to be Editable or Deletable.

To define lines as editable

Use a Salesforce formula field to control the editable status of a line on the zpl_ContractLineItem_c, zpl_PriceLookupLineItem_c, and zpl_DealLine_c objects.

  1. From the Lightning App Launcher, go to the appropriate Product Selector Configuration.
  2. In the Related tab, in the Edit Line Dialog Filters section, select New.
  3. In the New Edit Line Dialog Filter dialog:
    1. Line Item Field Name—​Enter the API name of a Boolean Salesforce formula field on the Contract Line Item or the Price Lookup Line.
  4. Select Save.

When the field evaluates as TRUE on any given line item, the dialog filter will set the Editable flag on that line when it is loaded into the Line Items list.

Tip
  • If you create several edit line dialog filters, all of them must evaluate as TRUE on any given line for it to be Editable.
  • If the line is set to non-editable, then:
    • You can still select it together with other lines. However, when you select Edit, the line will not open in the Edit Lines modal dialog.
    • The row-level Edit button will not be displayed on the line.

To define lines as deletable

Use a Salesforce formula field to control the deletable status of a line on the zpl_ContractLineItem_c, zpl_PriceLookupLineItem_c, and zpl_DealLine_c objects.

  1. From the Lightning App Launcher, go to the appropriate Product Selector Configuration.
  2. In the Related tab, in the Delete Line Dialog Filters section, select New.
  3. In the New Delete Line Dialog Filter dialog:
    1. Line Item Field Name —​Enter the API name of a Boolean Salesforce formula field on the Contract Line Item or the Price Lookup Line.
  4. Select Save.

When the field evaluates as TRUE on any given line, the dialog filter will set the Deletable flag on that line when it is loaded into the Line Items list.

Tip
  • If you create several delete line dialog filters, all of them must evaluate as TRUE on any given line for it to be Deletable.
  • If the line is set to non-deletable, then:
    • You can still select it together with other lines. However, when you select Delete, the line will not be deleted.
    • The row-level Delete button will not be displayed on the line.

To hide non-editable lines

You can decide to hide non-editable lines from the Line Items list. This simplifies the search and enhances your productivity.

  1. From the Lightning App Launcher, go to the appropriate Product Selector Configuration.
  2. In the Details tab, select the Hide Non-Editable Lines checkbox.
  3. Select Save.

You will now be able to see only the lines that you can edit.

To add editable/deletable columns to the list

You can add two special columns—Editable and Deletable—to the Line Items list by using the Line List Columns object. And you can mark these columns as visible to enable their filtering.

  1. From the Lightning App Launcher, go to the appropriate Product Selector Configuration.
  2. In the Related tab, in the Line List Column section, select New:
    1. Column Editable Indicator TypeEditable/Deletable.
    2. Line List Column NameEditable/Deletable.
    3. Visible by Default checkbox—Checked.
  3. Select Save.
Tip
  • If you add the Editable/Deletable columns to the line list then you will be able to filter these columns by using the filter panel controls.
  • These columns do not have to be in the Filter Field Set. They will be available as filters automatically.
  • If you do not want these columns to be visible in the list, you can still have them configured and clear the Visible by Default checkbox.

Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.