Happy Business Starts Here

Highlighted
Zuora Support

I am using ZQL it says default payment method id doesn’t exist. Please advise.

Question:

 

I am using below ZQL it says default payment method id doesn’t exist. Please advise.

 

Select Id, crmId, InvoiceTemplateId, PaymentTerm, DefaultPaymentMethodId, AccountNumber, CreditBalance, CrmId, Batch, Name, AutoPay, Currency, Status, InvoiceDeliveryPrefsEmail, InvoiceDeliveryPrefsPrint, CommunicationProfileId, PaymentGateway from Account where crmId = 'XXXXX'

 

Answer:

 

The default payment method id will not work since as per the design the account and default payment method are not joined objects, Hence you have to use the below format to retrieve the Default payment method id.

Select Id, crmId, InvoiceTemplateId, PaymentTerm, DefaultPaymentMethod.Id as DefaultPaymentMethod_Id, AccountNumber, CreditBalance, CrmId, Batch, Name, AutoPay, Currency, Status, InvoiceDeliveryPrefsEmail, InvoiceDeliveryPrefsPrint, CommunicationProfileId, PaymentGateway from Account where crmId = 'XXXXXXX'




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