Search code examples
formsgridviewaxaptadynamics-ax-2012x++

How to show in the same Form Grid, Header and Line records?


I have a problem. I need to have in the same Form's Grid both Header record and Line record.

My Header is CustInvoiceJour my Line is CustInvoiceTrans the Table relation is by : CustInvoiceTrans.ParentRecId == CustInvoiceJour.RecId.

I want to show some CustInvoiceJour fields and another CustInvoiceTrans fields in the same grid.

On web I found this tutorial : but I forget something or I need more information. Because I only see an only one CustInvoiceJour with it Line, and all other Header and its aren't show.

Can you help me ? Do you have another explain example or advice ?


Solution

  • Add CustInvoiceJour and CustInvoiceTrans as data sources. On the CustInvoiceTrans datasource change properties JoinSource to CustInvoiceJour and LinkType to InnerJoin.

    On the grid control set the DataSource property to CustInvoiceJour.

    Drag the fields from datasources to the field.