Happy Business Starts Here

Zuora Alumni

when creating a Z-Quote when we input the start date ahead of today, it throws an error

Problem:

 

On the SFDC production, when creating a Z-Quote – when we input the start date ahead of today, it provides the reps with an error.

This is not observed if we leave this as today’s defaulted date.

We have checked that the Service Activation and Customer Acceptance Dates are not required fields when creating subscriptions in Zuora.






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
Highlighted
Zuora Alumni

Re: when creating a Z-Quote when we input the start date ahead of today, it throws an error

Solution:

 

Based on reviewing the SFDC org, it was noticed that  custom  VF page was being used as create Quote page.
This waa calling a custom Apex class.
This class is implementing the following :

 

public class PopulateDefaultFieldValuePlugin implements IPopulateValuePlugin {}

 

and in line 187,  the service activation date was being passed as  today :

 

record.put('zqu__Service_Activation_Date__c', Date.today());

 

so, customer was  passing this default value to service activation date which is today,

Hence, when Quote start date (which is effectively contract effective date) was chosen to be a future date , zuora validation error was thrown as Service Activation Date was earlier than Quote start date which is Contract Effective date.

 

In line 255 of the  custom Apex class , following was being printed:

 

System.Debug('AB: quote ' + parentController.quote);

 

So,  we could see in debug log what value was  being passed:

 

18:36:26.184 (192333711)|USER_DEBUG|[255]|DEBUG|AB: quote zqu__Quote__c:{RecordTypeId=012380000005fWdAAI, zqu__Opportunity__c=0063800000elliqAAA, zqu__RenewalTerm__c=12, zqu__InitialTerm__c=12, zqu__ValidUntil__c=2017-06-10 00:00:00, zqu__StartDate__c=2017-05-15 00:00:00, zqu__Service_Activation_Date__c=2017-05-11 00:00:00, zqu__PaymentMethod__c=Credit Card, zqu__AutoRenew__c=true, zqu__Account__c=0015000000mL5s9AAC, zqu__BillingBatch__c=Batch1, Name=Quote for Daily Planet- zuora test 2, zqu__QuoteTemplate__c=a5p38000000PB1tAAG, zqu__BillingMethod__c=Email, zqu__PaymentTerm__c=Due Upon Receipt, zqu__Currency__c=USD, zqu__RenewalSetting__c=RENEW_WITH_SPECIFIC_TERM, zqu__SubscriptionType__c=New Subscription, zqu__ZuoraAccountID__c=null, zqu__Primary__c=false, zqu__SoldToContact__c=, zqu__BillToContact__c=, Support_Contact_1__c=0033800002gtwsbAAA, Support_Contact_2__c=}






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
Highlighted
Zuora Alumni

Re: when creating a Z-Quote when we input the start date ahead of today, it throws an error

Solution:

 

Based on reviewing the SFDC org, it was noticed that  custom  VF page was being used as create Quote page.
This waa calling a custom Apex class.
This class is implementing the following :

 

public class PopulateDefaultFieldValuePlugin implements IPopulateValuePlugin {}

 

and in line 187,  the service activation date was being passed as  today :

 

record.put('zqu__Service_Activation_Date__c', Date.today());

 

so, customer was  passing this default value to service activation date which is today,

Hence, when Quote start date (which is effectively contract effective date) was chosen to be a future date , zuora validation error was thrown as Service Activation Date was earlier than Quote start date which is Contract Effective date.

 

In line 255 of the  custom Apex class , following was being printed:

 

System.Debug('AB: quote ' + parentController.quote);

 

So,  we could see in debug log what value was  being passed:

 

18:36:26.184 (192333711)|USER_DEBUG|[255]|DEBUG|AB: quote zqu__Quote__c:{RecordTypeId=012380000005fWdAAI, zqu__Opportunity__c=0063800000elliqAAA, zqu__RenewalTerm__c=12, zqu__InitialTerm__c=12, zqu__ValidUntil__c=2017-06-10 00:00:00, zqu__StartDate__c=2017-05-15 00:00:00, zqu__Service_Activation_Date__c=2017-05-11 00:00:00, zqu__PaymentMethod__c=Credit Card, zqu__AutoRenew__c=true, zqu__Account__c=0015000000mL5s9AAC, zqu__BillingBatch__c=Batch1, Name=Quote for Daily Planet- zuora test 2, zqu__QuoteTemplate__c=a5p38000000PB1tAAG, zqu__BillingMethod__c=Email, zqu__PaymentTerm__c=Due Upon Receipt, zqu__Currency__c=USD, zqu__RenewalSetting__c=RENEW_WITH_SPECIFIC_TERM, zqu__SubscriptionType__c=New Subscription, zqu__ZuoraAccountID__c=null, zqu__Primary__c=false, zqu__SoldToContact__c=, zqu__BillToContact__c=, Support_Contact_1__c=0033800002gtwsbAAA, Support_Contact_2__c=}






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