0

We add all the relevant field inside the fieldset Line Editor and the fields show exactly as we wanted. Our customer now ask as to make some columns inside the CPQ Quote line editor read only. Is there a way to accomplish this with a standard feature without having to create a lot of formula field on Quote and Quote Line item object in Salesforce ?

1
  • Can you check "Configure Columns" functionality in the CPQ Quote Line Editor? I think there we have "Edit Column Properties" and make column read only Commented Mar 30, 2023 at 13:37

2 Answers 2

1

As per the CPQ documentation, this seems feasible using the Javascript Page Security Plugin

Extracts from the documentation

The Javascript Page Security plugin supports four functions. The functions isFieldVisible and isFieldEditable are available starting in Salesforce CPQ Summer '15 and control quote line field visibility and editability. The functions isFieldVisibleForObject and isFieldEditableForObject are available starting in Salesforce CPQ Summer '19 and can control field visibility and editability for both quote fields and quote line fields. When a method using one of these functions returns False, Salesforce CPQ locks or hides the chosen fields. The fields are unchanged if the method returns Null or True.

To create a page security plugin, define your code in a custom script record and then reference that record's name in the Quote Calculator Plugin field within Salesforce CPQ Plugin package settings. If you’re already using a quote calculator plugin in that field, you can add your page security plugin code to the calculator plugin’s custom script record.

To specify whether your changes apply to a field on the quote or on the quote line, use an if statement for your objectName in the isFieldVisibleForObject or isFieldEditableForObject code block.

Sample code how to render quote line field readonly based on specific conditions:

export function isFieldEditableForObject(fieldName, line, conn, objectName){
  if (objectName === 'QuoteLine__c' && fieldName === 'SBQQ__MarkupRate__c') {
     if (line.SBQQ__CustomerDiscount__c > 10) {
       return false;
   }
 }
}
1
  • @l-benedettini does this help in answering your question ?
    – Shamina
    Commented Apr 5, 2023 at 12:35
0

Unfortunately, It is not possible to make a text field read-only in the Quote Line Editor. Please consider using formula text field instead.

Also check below options.

  • To make a field editable/non-editable on the Quote Line Editor, you can leverage the Page Security Plugin (PSP).

  • You can also hide or show a field on the QLE by dynamically changing the Salesforce CPQ Quote Line Editor column headers. Check details here.

You might want to review More Control to the Quote Line Editor UI limitation and vote.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .