Symptom
- When using the CTX tag <*CTX( Quote.CurrentItem.CustomField(<custom_field_name>) )*> in SAP CPQ, incorrect data is displayed.
- The issue arises when a new item is being configured but not yet created. The system displays the value from the first item in the Formula Builder or script result.
Environment
SAP Sales Cloud CPQ
Reproducing the Issue
- Open a quote containing 2 items and edit the second item.
- Open Formula Builder and execute script with tag <*CTX( Quote.CurrentItem.CustomField(<custom_field_name>) )*>. The system shows a value, which is correct.
- Return to quote.
- Open Configurator with Add Item button.
- Open Formula Builder and execute script with tag <*CTX( Quote.CurrentItem.CustomField(<custom_field_name>) )*>. The system shows a different value, which is incorrect as it is data from the first product item.
Cause
The issue arises due to the incorrect usage of the CTX tag. The context of the configurator differs from that of the quote, even if the configurator is accessed through the quote.
Within the configurator context, the CTX tag <*CTX(Quote.CurrentItem)*> is not applicable.
Resolution
- Understand that the context of the configurator differs from that of the quote.
- Realize that within the configurator context, the CTX tag <*CTX(Quote.CurrentItem)*> is not applicable.
- For retrieving product information in the configurator, use the <*CTX( Product )*> tag instead.
See Also
Keywords
SAP CPQ, CTX Tag, Incorrect Data, Configurator, Quote, Product Information, Item_External_Id, Formula Builder, Script Result. , KBA , CEC-SAL-CPQ , Sales Cloud CPQ , Problem
Product
SAP CPQ all versions