Happy Business Starts Here

Zuora Alumni

Child Quote or Parent Quote or Readonly quote cannot be previewed Error on the Quote.

Problem

 

When the the quote is sent to zbilling, we are seeing error message 
"Child Quote or Parent Quote or Readonly quote cannot be previewed."

 

 



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

8 REPLIES 8
Zuora Alumni

Re: Child Quote or Parent Quote or Readonly quote cannot be previewed Error on the Quote.

Solution :

 

As per the Product Design, The error is thrown because , zqu.zQuoteUtil.previewQuotes() method do not support to preview the Quote Metric value for Child Quote or Parent Quote or Readonly quote.

Please confirm if you have the following setting enabled in your configuration which makes the Quote read only after it has been sent and hence you are unable to preview the metrics!

 

 

Additionally, to keep this setting set to true, and not receive the error, Please set the field "zqu__IsChargeExpired__c" to False for Quotes with status "Sent to Z-Billing



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

Guru

Re: Child Quote or Parent Quote or Readonly quote cannot be previewed Error on the Quote.

We see this error on some of our closed quotes as well. This seems to me that it is a bug in Z-CPQ. It shouldn't request metrics if the status is Sent to Z-Billing or am I missing something here. @nathanc

Maggie Longshore
Support SME

Re: Child Quote or Parent Quote or Readonly quote cannot be previewed Error on the Quote.

Hi @MaggieL can you please check the  1) RecodType of these Quotes and 2) the zqu__Is_Charge_Expired__c field value of these Quotes?

 

Thank you

Doyeli






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

Guru

Re: Child Quote or Parent Quote or Readonly quote cannot be previewed Error on the Quote.

Yes the is expired field is true on some of these quotes and the record type is 'Renewal ReadOnly' - I don't have the report to get all of the ones to check.

 

We determined that the reason our rollup summary fields on these quotes is not populating is that there are no Quote Charge Detail records associated with them.  These are quotes that were created by custom code and sent to z billing by custom code and they were never opened by a human in a browser.

 

I know we either had a discussion here in community or in a help desk ticket about how to 'pretend' to open a quote through Apex.  I am unable to locate the conversation.

 

 

Maggie Longshore
Support SME

Re: Child Quote or Parent Quote or Readonly quote cannot be previewed Error on the Quote.

Hi @Maggie so looks like since the is charge expired field is set to True, when you are trying to open the Quotes, it is trying to make a Preview call and throwing the error as the Quotes are ReadOnly.

 

Also, FYI, you can generate QCD records by running a Preview on a quote, using the JR_recalculate global method

 

1) 

zqu__Quote__c quote = [SELECT Id, zqu__Is_Charge_Expired__c FROM zqu__Quote__c WHERE Id = 'xxxxxxxxxx'];
quote.zqu__Is_Charge_Expired__c = true;
update quote;

 

 

2) 

zqu.zQuoteUtil.ZBillingResult previewResult = zqu.QuoteRecalculateController.JR_recalculate('xxxxxxxxxxx');

if (previewResult.success) {
    System.debug('The metrics were successfully updated on all Quote Charge Details, Quote Charge Summaries, and Quote Rate Plan Charges.');   
}

 

But if the recordtype is Readonly and the quote status is Sent to ZBilling, I believe you will get the error discussed in this thread.

You can  try setting the  RecordReadOnly as false and then try running the above and see how it works

 

Thank you
Doyeli






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

Support SME

Re: Child Quote or Parent Quote or Readonly quote cannot be previewed Error on the Quote.

Hi @MaggieL wanted to follow up if my suggested steps worked for you.

 

Thank you

Doyeli






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

Guru

Re: Child Quote or Parent Quote or Readonly quote cannot be previewed Error on the Quote.

@doyeli I tried calling JR_recalculate() after I modify the quote in sandbox and it seems to solve the issue for me. I need to do more testing.

Maggie Longshore
Highlighted
Support SME

Re: Child Quote or Parent Quote or Readonly quote cannot be previewed Error on the Quote.

Thank you @MaggieL






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