[CPQ 222] Error "Attempt to de-reference a null object" when entering bundle re-configuration

Salesforce CPQ (Configure-Price-Quote)

Last updated 27 days ago ·Reference W-6633332 ·Reported By 9 users

Fixed in version Salesforce CPQ 222.5

Summary
Upon upgrading to CPQ 222, when clicking the wrench to enter bundle re-configuration from the Quote Line Editor, an error occurs: "Attempt to de-reference a null object".

This error occurs if there are product options in the bundle which have products with SBQQ__HasConfigurationAttributes__c set to TRUE but the products do not have any Configuration Attributes.

Repro
1. Create a bundle parent product (Configuration Type = Allowed | Configuration Event = Edit)
2. Create a bundle child product. Set Has Configuration Attributes = TRUE on this child product
3. Create a product option linking the parent to the child (Selected = TRUE | Required = TRUE)
4. Create a quote
5. Add the bundle parent to the quote (should skip configuration due to configuration type/event, but will add child product along with parent)
6. Once back at the QLE, click the reconfiguration wrench for the bundle

Workaround
Set the SBQQ__HasConfigurationAttributes__c field to FALSE on all products that do not have configuration attributes.

Running the following code in anonymous apex will print out all the products in the org which have SBQQ__HasConfigurationAttributes__c incorrectly set to true in your org:

//START CODE
List<Product2> prodList = [SELECT ID FROM Product2 WHERE SBQQ__HasConfigurationAttributes__c = TRUE];
Set<Id> prodIdSet = new Set<Id>();
for(Product2 prod:prodList){
prodIdSet.add(prod.Id);
}
List<SBQQ__ConfigurationAttribute__c> caList = [SELECT Id, SBQQ__Product__c FROM SBQQ__ConfigurationAttribute__c];
Set<Id> caProdIdSet = new Set<Id>();
for(SBQQ__ConfigurationAttribute__c ca:caList){
caProdIdSet.add(ca.SBQQ__Product__c);
}
Set<Id> prodIdSetCopy = prodIdSet;
prodIdSetCopy.removeAll(caProdIdSet);
for(Id prodId:prodIdSetCopy){
system.debug('The Product with ID ' + prodId + ' has no Configuration Attributes, but has SBQQ__HasConfigurationAttributes__c = TRUE');
}
//END CODE

Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.