Happy Business Starts Here

Re: QUote validation error : "Please enter a discount"

Highlighted
Zuora Alumni

Quote validation error : "Please enter a discount"

Problem:

 

After the quote upgrade, our existing quotes have issues.

Error  "Please enter a discount" gets thrown. This happens when we add product.

 

Example, following error is thrown in UI

 

zuora_quote_error.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 ACCEPTED SOLUTION

Accepted Solutions
Zuora Alumni

Re: QUote validation error : "Please enter a discount"

Solution:

 

 

By running the following query it was noticed that the Quote Rate Plan charge record that was already added to the existing Quote, had the discount field value 'null' .

 

select id,name,createdDate,zqu__ListPrice__c,zqu__Discount__c,zqu__Model__c,zqu__ProductRatePlanCharge__c from zqu__QuoteRatePlanCharge__c  where zqu__QuoteRatePlan__r.zqu__Quote__c = 'xxxxxxxx'

 

The error was thrown from the following line of code, when all the conditions were satisfied.

 

if (true == this.discountEditable && this.theQCharge.get('listpricec') != 0 && null == this.theQCharge.get('discountc'))

 

in reviewing Debug log, it was confirmed that discountEditable was "true" for that already existing charge.
From the above query, discount field value was null for the charge and had value for List Price.

Hence all the conditions from the above line of code being met, the error was thrown.

 

updating  Quote Rate Plan charge record to set the Discount field (zqu__Discount__c) value to 0  resolved the issue.

 

 






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

View solution in original post

1 REPLY 1
Zuora Alumni

Re: QUote validation error : "Please enter a discount"

Solution:

 

 

By running the following query it was noticed that the Quote Rate Plan charge record that was already added to the existing Quote, had the discount field value 'null' .

 

select id,name,createdDate,zqu__ListPrice__c,zqu__Discount__c,zqu__Model__c,zqu__ProductRatePlanCharge__c from zqu__QuoteRatePlanCharge__c  where zqu__QuoteRatePlan__r.zqu__Quote__c = 'xxxxxxxx'

 

The error was thrown from the following line of code, when all the conditions were satisfied.

 

if (true == this.discountEditable && this.theQCharge.get('listpricec') != 0 && null == this.theQCharge.get('discountc'))

 

in reviewing Debug log, it was confirmed that discountEditable was "true" for that already existing charge.
From the above query, discount field value was null for the charge and had value for List Price.

Hence all the conditions from the above line of code being met, the error was thrown.

 

updating  Quote Rate Plan charge record to set the Discount field (zqu__Discount__c) value to 0  resolved the issue.

 

 






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

View solution in original post