SAP Knowledge Base Article - Public

3406415 - Quote context exists on the quote list page

Symptom

When executing scripts via responsive templates that open quote list, quote context is present in the Quote list page causing an error in the script execution.

Environment

SAP SALES CLOUD CPQ

Reproducing the Issue

Add a piece of code in a responsive template  to call a global script that will check quote context as following example:

Global script:

if context.Quote:
    Log.Write('Context encountered')
else:
    Log.Write('The context variable does not contain a quote object')
ApiResponse = ApiResponseFactory.JsonResponse(execute())

Responsive Template:

<script>
    cpq.ready(() => {
        cpq.server.executeScript("Testscript", {}, function(data) {
            console.log(data);
        })
    })
</script>

This triggers the Context.

Cause

Bug in application.

Resolution

Issue will be fixed in future releases.

Keywords

bug, CPQ, context, quote, responsive, template, script, global  , KBA , CEC-SAL-CPQ , Sales Cloud CPQ , Known Error

Product

SAP CPQ 2023