Knowledge Center

Knowledge Center > Commerce > Zuora for Salesforce Development Resources > Zuora for Salesforce Component Library > Zuora for Salesforce Global Classes > QuoteRecalculateController Class

QuoteRecalculateController Class

This article describes the methods in the QuoteRecalculateController class. Use the methods to programmatically invoke the subscription preview call to Zuora.

QuoteRecalculateController Class Global Methods 

The following methods are supported in the QuoteRecalculateController class.

Return Type Method Description
 zqu.zQuoteUtil.ZBillingResult JR_recalculate

This method makes the subscription preview call to Zuora and returns the result.

This call also updates the quote and charge level metrics with the results. 

 zqu.zQuoteUtil.ZBillingResult recalculateNoUpdate This method makes the subscription preview call same as JR_recalculate, but this method does not update the quote and charge level metrics in Salesforce.

Sample Code

The following is a sample call for the JR_recalculate global method:

zqu.zQuoteUtil.ZBillingResult previewResult = zqu.QuoteRecalculateController.JR_recalculate('<quoteId>');

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

 The following is a sample call for the recalculateNoUpdate global method:

zqu.zQuoteUtil.ZBillingResult previewResult = zqu.QuoteRecalculateController.recalculateNoUpdate('<quoteId>');

if (previewResult.success) {
    System.debug('The preview to Zuora was successful. However, the metrics were not refreshed for Quote Charge Details, Quote Charge Summaries, or Quote Rate Plan Charges.');    
}
Last modified
11:27, 29 Aug 2016

Tags

This page has no custom tags.

Classifications

(not set)