I am creating a generic inquiry where i would like to join the ARInvoice table to the FSServiceOrder table. This is so i can refence the docdate of the Invoice. What are the Parent and child fields to link service orders and AR invoices table?
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/821be969-b89d-48ee-8655-61140ab605b1.png)
I am creating a generic inquiry where i would like to join the ARInvoice table to the FSServiceOrder table. This is so i can refence the docdate of the Invoice. What are the Parent and child fields to link service orders and AR invoices table?
I don’t have much experience with the Service module, but from a bit of investigation, it looks like Invoices would show up under ‘Billing Documents’ on Appointments. These documents come from the FSBillHistory table, which can be joined to FSServiceOrder like:
FSServiceOrder.SrvOrdType
= FSBillHistory.SrvOrdType
and
FSServiceOrder.RefNbr
= FSBillHistory.ServiceOrderRefNbr
.
Then, to join the FSBillHistory table to ARInvoice:
FSBillHistory.ChildDocType
= ARInvoice.DocType
and
FSBillHistory.ChildRefNbr
= ARInvoice.RefNbr
Thanks for your response. I will try it and keep you posted. Do you know what would be a good resource to get a better understanding of table relationships in Acumatica or an in-depth guide on generic inquires?
Hello
To get a better understanding of the DAC/Table relationships, you can use the Merged DAC Relations (SM402000) screen and DAC Schema Browser.
In addition, you can follow the S130 Data Retrieval and Analysis course at Acumatica University.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.