SAP Knowledge Base Article - Public

3763668 - CustomField AccessLevel via Scripting doesn't work on quotation tab

Symptom

Custom Field Access Level via scripting is ignored on the Quotation tab in SAP CPQ: even when set to Read Only during “Before quote rendering".

Environment

SAP CPQ

Reproducing the Issue

  1. Open a new quote in status 'In Progress' (default) 
  2. Open Global Script 
  3. The Global Script must be the last entry in the event 'Before quote rendering' otherwise Access Level are ignored 
  4. Set an Access Level of a Custom Field
  5.  Log the Access Level to the console after that
  6. The right Access Level is printed to the console, but the Custom field still always use the visibility which is defined on the custom field itself

Cause

Before quote rendering event as a condition for some action, and it overrides the existing custom fields that are saved because they are being loaded and overridden

 

Resolution

  • You can use CTX tag for the custom field value instead of calling it in the script.
  • Example: [IF]([EQ](<*CTX( Quote.CustomField(custom_field_name) )*>, custom_field_value)) {execute script} [ENDIF]
 

Keywords

CTX Tag, custom field, access level, error, script, quote, CPQ , KBA , CEC-SAL-CPQ , Sales Cloud CPQ , How To

Product

SAP CPQ all versions