SAP Knowledge Base Article - Public

3435468 - Incorrect behaviour of custom field editability when we change status of quote via global script

Symptom

  • When changing a quote's status via global script, a custom field whose status is also getting changed from Editable to Read-only is still editable, until we leave the quote and go back to it from the Load quotes page.
  • Expectation is that when the script is triggered and the quote status changes, the custom field should also reflect the new permission (read-only) immediately, since if this doesn't happen then a sales rep would be able to still edit the custom field and change it's value.

Environment

SAP SALES CLOUD CPQ

Reproducing the Issue

  1. Create a custom field (eg: 'Test custom field') and under it's Permissions, set Editable for the default quote status, and Read-only for a different quote status, for your User-type.
  2. Create a global script for changing the quote status when the custom field has a certain value.
  3. Go to Events tab of the global script and add your custom field under the Event "After changing value of custom fields", and Save it.
  4. Now go to any quote in Open status and change the custom field value to "Yes".
  5. Observe that the quote status changes to 'Order Created with Errors', but the custom field is still Editable.
  6. Now if we load the quote again by going to Load Quotes page, the custom field is in Read-only mode now (correctly).

 Global script sample:

if Quote.GetCustomField('Test custom field').Content == 'Yes':
    Quote.ChangeQuoteStatus('Order Created with Errors')
Quote.Save()

Cause

Confirmed bug.

Resolution

This issue has been confirmed as a bug and it'll be tentatively fixed in the CPQ-2411 release.

Keywords

bug, custom field editability, global script, editable, readable, change quote status , KBA , CEC-SAL-CPQ , Sales Cloud CPQ , Problem

Product

SAP CPQ all versions