Happy Business Starts Here

Err on Amendment Quote: Content cannot be displayed: Attempt to de-reference a null object

Support SME

Err on Amendment Quote: Content cannot be displayed: Attempt to de-reference a null object

Problem:

========

Getting the following error on an Amendment Quote:

 

"‘Content cannot be displayed: common.apex.runtime.impl.ExecutionException: Attempt to de-reference a null object"



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

1 REPLY 1
Support SME

Re: Err on Amendment Quote: Content cannot be displayed: Attempt to de-reference a null object

Solution:

=========

 

In reviewing  Debug log  the error was thrown from following:

 

 

Class.zqu.zQuoteUtilHelper.applyAmendedCharges: line 1065, column 1

 

This Method applyAmendedCharges handles detail logic to apply the SFDC saved amendment charges with Original Subscription information generated from Zuora

 

19:23:46.332 (3804508380)|METHOD_EXIT|[229]|01p0Q000000D4Ei|zqu.CpqSelectProductController.initialSelectProductComponent()
19:23:46.332 (3804518967)|SYSTEM_MODE_EXIT|false
19:23:46.332 (3804929707)|FATAL_ERROR|System.NullPointerException: Attempt to de-reference a null object

Class.zqu.zQuoteUtilHelper.applyAmendedCharges: line 1065, column 1
Class.zqu.zQuoteUtilHelper.getChargeGroupsForAmendSubscription: line 999, column 1
Class.zqu.zQuoteUtilHelper.getChargeGroups: line 760, column 1
Class.zqu.zQuoteUtil.getChargeGroups: line 33, column 1
Class.zqu.QuoteProductHandler.__sfdc_chargeGroups: line 9, column 1
Class.zqu.QuoteProductHandler.getAddedChargeGroups: line 38, column 1
Class.zqu.QuoteProductHandler.getProductsFromSalesforce: line 32, column 1
Class.zqu.AmendmentQuoteProductHandler.getProductsFromZuoraAndSalesforce: line 23, column 1
Class.zqu.AmendmentQuoteProductHandler.initializeQuoteProducts: line 18, column 1
Class.zqu.Quote.initQuoteProducts: line 510, column 1
Class.zqu.Quote.getInstance: line 503, column 1
Class.zqu.CpqSelectProductController.initialSelectProductComponent: line 572, c

In running the following query

select id,name,zqu__subscriptiontype__c,zquexistsubscriptionid__c,zqu__ZuoraSubscriptionID__c,zqu__status__c from zquQuote_c where id = 'a270Q000000aCaq'


I could confirm this is an Amendment Quote.


The field zqu__existsubscriptionid__c should have the zuora id of the original subscription that has been amended, which is nnnnnnnnnnnnnn

and, zqu__ZuoraSubscriptionID__c should have the Zuora ID of the subscription that is created as part of this amendment.

But, in running the above query, I noticed both these fields have the same Zuora ID value, the id of the new, 2nd version of the subscription.
Not sure how this happened.

After updating zqu__existsubscriptionid__c field value to have nnnnnnnnnnnnnn(version 1 of the original subscription) the problem is resolved.
The Quote could be opened without any error



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √