SAP Knowledge Base Article - Public

3732075 - Mismatch between CTX(Dictionary.Current.Name) and User.SelectedDictionary.Name when using a custom default dictionary in SAP CPQ

Symptom

A custom dictionary (for example, US English custom dictionary) is configured as the tenant default dictionary and is available to all users.

When the Default Dictionary field on the User Page is set to Default Dictionary:

  • The formula tag <*CTX(Dictionary.Current.Name)*> correctly returns the custom default dictionary name (for example, US English custom dictionary).
  • The IronPython expression User.SelectedDictionary.Name incorrectly returns the root dictionary name (for example, US English) instead of the configured custom default dictionary.

This behavior is observed in the Script Workbench.

However, when a specific dictionary is explicitly selected in the Default Dictionary field on the User Page, both <*CTX(Dictionary.Current.Name)*> and User.SelectedDictionary.Name return the same value correctly.

Environment

SAP CPQ

Reproducing the Issue

  1. Configure a custom dictionary (for example, US English custom dictionary) as the tenant default dictionary.
  2. Open the User Page.
  3. Set the Default Dictionary field to Default Dictionary.
  4. Save the user.
  5. Open the Formula Validator and evaluate:

    <*CTX(Dictionary.Current.Name)*>
  6. Observe that the custom dictionary name is returned.
  7. Open the Script Workbench and execute:

     
    x = User.SelectedDictionary.Name
  8. Observe that the root dictionary name is returned instead of the custom default dictionary name.

Cause

This is a confirmed product issue in SAP CPQ.

The issue occurs when:

  • the user does not have a dictionary explicitly assigned, and
  • the tenant default dictionary is configured as a custom dictionary.

In this scenario, User.SelectedDictionary.Name resolves to the root dictionary name instead of the effective custom default dictionary.

Resolution

The issue is planned to be fixed under reference CPQ-2608.

Workaround:

  1. Open the User Page in Setup.
  2. Explicitly save the user record.
  3. Re-run the script in the Script Workbench.

After saving the user, User.SelectedDictionary.Name should return the same value as:

<*CTX(Dictionary.Current.Name)*>.

See Also

Keywords

dictionary mismatch, default dictionary, custom dictionary, ctx(dictionary.current.name), user.selecteddictionary.name, script workbench, formula validator, language dictionary, tenant default, selected dictionary, cpq-2608, bug, workaround, sales cloud cpq, discrepancy , KBA , CEC-SAL-CPQ , Sales Cloud CPQ , Problem

Product

SAP CPQ all versions