i need to export Invoice details and for each detail i need to have Payment Method and payment values.
Currently my query is
Select Invoice.ID, Invoice.*, Account.*, BillToContact.*, SoldToContact.*,
DefaultPaymentMethod.*, InvoiceItem.*, RatePlanCharge.*, RatePlan.*, Subscription.*,
ProductRatePlan.*, Product.*, InvoicePayment.*, Payment.*, PaymentMethod.*
I realized that i can't put into the select fields directly Payment or PaymentMethod.
How can i do ?
I need an explicit join ?
My wish is that every row of the export csv matches an invoice item.
Solved! Go to Solution.
You cannot directly export Payment or PaymentMethod fields from Invoice because they are not directly joining the Invoice object. Feel free to refer to Zuora Object Model and Export ZOQL to see their respective joining objects.
If you want to export invoices and all related payments and payment methods, I would suggest you query upon the InvoicePayment object. Payment, PaymentMethod, and Invoice objects are all joining this object. See Invoice Payment Data Source for details.
Hope it helps!