SAP Knowledge Base Article - Public

3646062 - LifetimeScope error in CPQ

Symptom

Error message: Instances cannot be resolved and nested lifetimes cannot be created from this LifetimeScope as it (or one of its parent scopes) has already been disposed.

Environment

SAP SALES CLOUD CPQ

Reproducing the Issue

In order to reproduce it's necessary to have a script storing any Quote state (For example, Quote context) in module.
When this module is called trying to get the state, error is thrown.

Cause

As CPQ caches modules variables, the state is cached as well and same state is re-used inside modules, causing stale dependencies.

Resolution

Quote states shouldn't be stored in modules. Modules should be used explicatable as places to store the methods. 

Keywords

module, script, context, state, lifetime, scope, error, CPQ, instances, stale , KBA , CEC-SAL-CPQ , Sales Cloud CPQ , Known Error

Product

SAP CPQ 2025