Happy Business Starts Here

"Attempt to de-reference a null object" error on Quote detail page

Zuora Support

"Attempt to de-reference a null object" error on Quote detail page


In one specific scenario, customer is getting "Attempt to de-reference a null object" error on the Quote detail page


On reviewing debug logs, it has been identified that error is thrown from stack trace

|Error while processing preview results: Class.zqu.OrderActionBuilderFactory.CreateSubscriptionOrderActionBuilder.createInitialTerm: line 242, column 1
Class.zqu.OrderActionBuilderFactory.CreateSubscriptionOrderActionBuilder.createSubscriptionTerm: line 231, column 1
Class.zqu.OrderActionBuilderFactory.CreateSubscriptionOrderActionBuilder.createSubscriptionData: line 223, column 1

 line 242 of createInitialTerm method:
initialTerm.termType = quoteInfo.Subscription_Term_Type__c.toUpperCase();

On running below query on Quote, it has been noticed that zqu__Subscription_Term_Type__c is null.

select id,name,zqu__startdate__c,zqu__subscriptiontype__c,zqu__initialterm__c,zqu__Subscription_Term_Type__c,zqu__InitialTermPeriodType__c from zqu__quote__c where id = 'XXX'


Once field is updated with value "Termed", Issue is resolved

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