Happy Business Starts Here

Zuora Support

Exception while converting to ChargeGroup.:System.NullPointerException:Attempt to de-reference


User was getting the below error when trying to send the Quote to Zuora

(convert2ZChargeGroup) Exception while converting to ChargeGroup.System.NullPointerException:Attempt to de-reference a null object(zqu) 
Error is in expression '{!theOptions}' in component <zqucpqselectproduct> in component zqucpqselectproduct

An unexpected error has occurred. Your solution provider has been notified. (zqu)



In this particular scenario, The error is thrown because on the Quote  6 Quote Amendmnet records( 5 New product records and 1 update Product record) were there
However, only 4 Quote Rate Plan records existed on the Quote

Running the following query

select id,name from zqu__Quoteamendment__c where zqu__quote__c = 'XX' and id not in (select zqu__QuoteAmendment__c from zqu__Quoterateplan__c where zqu__quote__c = 'XX')

you will find the id of the 2 Quote Amendmnet records that did not have Quote Rate plan records created


Issue is resolved by deleting the amendmnet records with no Quote Rate plans or by recreating the quote ensuring Quote rate plan records were created


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