Happy Business Starts Here

Valued Scholar

Creating Renewal Quote via Code

Creating a renewal quote via Global methods via following code

zqu__Quote__c quote = [
    SELECT Id,zqu__Currency__c,zqu__ExistSubscriptionId__c,
zqu__SubscriptionType__c,zqu__AmendmentName__c,zqu__Amendment_Name__c, 
zqu__RenewalTerm__c FROM zqu__Quote__c 
WHERE Id =: quote_Id LIMIT 1];

zqu.zQuoteUtil.renewQuote(quote);

After above code execution, whlie recalculting via

 

zqu.QuoteRecalculateController.JR_recalculate(quote_Id);

 

it is throwing an error.

 

Code: 58730000, Message: A base subscription with a 0 renewal term cannot be renewed.;

 

 

Using following KC to achive this fuctionality : 

https://community.zuora.com/t5/Zuora-CPQ/Code-to-create-a-renewal-quote-for-subscription/m-p/22545#!...
https://community.zuora.com/t5/Zuora-CPQ/The-renewalQuote-action-cannot-be-performed-on-a-quote-with...

 

 

 

6 REPLIES 6
Valued Scholar

Re: Creating Renewal Quote via Code

@doyeli Can you help me in this. Thanks

Support SME

Re: Creating Renewal Quote via Code

Hi @nikhil_ty  Absolutely. Let me review today and I will share my finding here.

 

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 √

Highlighted
Support SME

Re: Creating Renewal Quote via Code

Hi @nikhil_ty I  understand you have Orders enabled, please confirm.

Can you please send me Private message with your SFDC org ID, Zuore tenant id, the Quote ID that you are trying to renew .

Also please grant me login access to your SFDC org

 

Thank  you






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

Valued Scholar

Re: Creating Renewal Quote via Code

Done ! . 

Valued Scholar

Re: Creating Renewal Quote via Code

Hi @doyeli 

While using zqu.zQuoteUtil.renewQuote() I am facing this issue too .

 

https://community.zuora.com/t5/Zuora-CPQ/The-renewalQuote-action-cannot-be-performed-on-a-quote-with...

Valued Scholar

Re: Creating Renewal Quote via Code

  • Before using "renewalQuote()" action, I was adding products to quote, due to which it was NOT allowing me to use "renewalQuote()" and was showing :
     "The renewalQuote action cannot be performed on a quote with existing amendments".
  • While creating Quote, "zqu__RenewalTerm__c" was present, but it was showing,
     "A base subscription with a 0 renewal term cannot be renewed."
  • Solution For both Problems :
    • Insert a Quote of type renewal
    • Use renewalQuote() action.
    • Use zqu.zQuoteUtil.setSubscriptionTermChanges function for amending renewal term.