Reputation: 23
I'm learning to develop dynamics ax 2012 and I need to find the data in salesTable corresponding to a CustInvoiceJour record.
Does the method CustInvoiceJour.salesTable return the whole table or the associated record?
Upvotes: 1
Views: 1027
Reputation:
The return type of the function is tablebuffer as a tablebuffer type salesTable is return from the function as a foreign key relationship is exist between custinvoicejour and salesTable on salesId field.
SalesTable salesTable = SalesTable::find(this.SalesId, _update);
salestable buffer is find from custinvoicejour current buffer field value this.salesId which is pass into salestable function find which returns salestable buffer contains field values.
SalesTable salesTable(boolean _update = false)
{
SalesTable salesTable = SalesTable::find(this.SalesId, _update);
SalesTableDelete salesTableDelete;
SalesTable_RU salesTableRU;
if (!salesTable && this.SalesId && this.SalesType != SalesType::Journal)
{
salesTableDelete = SalesTableDelete::find(this.SalesId);
if (salesTableDelete.SalesTable)
{
[salesTable] = salesTableDelete.SalesTable;
salesTableRU = SalesTable_RU::findBySalesTable(salesTable.RecId);
salesTable.packSalesTable_RU(salesTableRU);
}
}
return salesTable;
}
Upvotes: 0
Reputation: 2605
It returns a sales table buffer that has records associated with customer invoice journal.
Upvotes: 3