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
- Configure a custom dictionary (for example, US English custom dictionary) as the tenant default dictionary.
- Open the User Page.
- Set the Default Dictionary field to Default Dictionary.
- Save the user.
-
Open the Formula Validator and evaluate:
<*CTX(Dictionary.Current.Name)*>
- Observe that the custom dictionary name is returned.
-
Open the Script Workbench and execute:
x = User.SelectedDictionary.Name
- 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:
- Open the User Page in Setup.
- Explicitly save the user record.
- 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
- Refer to: KBA 3283912 - Bug in Application
- Refer to: KBA 3487591 - Known Issues in SAP CPQ
- Refer to: CPQ Release Notes
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
SAP Knowledge Base Article - Public