Happy Business Starts Here

Support SME

Getting Error "List index out of bounds " when trying to add productRateplan thru code

Problem:

 

Customer is  calling the following :


return zqu.zQuoteUtil.getChargeGroup(quoteId, rateplanId);

 

The above code throws an exception 


List index out of bounds :

Class.zqu.ZQChargeCalculator.initTotal: line 758, column 1
Class.zqu.ZQChargeCalculator.initBasicInfo: line 466, column 1
Class.zqu.ZQChargeCalculator.populateQuoteCharge: line 263, column 1
Class.zqu.ZQQuoteCharge4NS.populateQuoteCharge: line 32, column 1
Class.zqu.zQuoteUtilHelper.convertProductRatePlanCharges: line 486, column 1
Class.zqu.zQuoteUtilHelper.getChargeGroup: line 311, column 1
Class.zqu.zQuoteUtil.getChargeGroup: line 9, column 1

 





SigNowBlue.png

 


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: Getting Error "List index out of bounds " when trying to add productRateplan thru code

Solution:

=======

 

Class.zqu.ZQChargeCalculator.initTotal: line 758 is the following:


else if (ZQConstants.MODEL_P == zcharge.Model_c) {
Decimal listPrice = chargeTiers[0].Price_c;==============this is the line

 

MODEL_P = 'Per Unit Pricing';

 

In this specifc case it was identified zqu_currency_c field on the quote record was not populated

select id,name,zqu__startDate__c,zqu__currency__c from zqu__Quote__c where id = 'a0g0X00001jDZJn'

The above query showed the zqu_currency_c was blank.

After setting a currency for the Quote, the issue was resolved





SigNowBlue.png

 


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