Hi Andre,
I add the tables New table (joined with the line table as read only, and this one joined with header table as read only)
I added the following fields to the entity:
AccountNum, Id, Date, LineLineNum, NewTableLineNum
I exported the entity and it worked fine. Then I tried to import,
i got an error that i need to fill all fields mentioned above in addition to reference
Do i need to add RefRecId of the NewTable(Third) to the entity as private
And also add RecId of the Line table to the entity as private
then add code to mapEntityToDatasource?
because i did this, and this time i got one error only regarding reference Field
what to do?
public void mapEntityToDataSource(DataEntityRuntimeContext _entityCtx, DataEntityDataSourceRuntimeContext _dataSourceCtx)
{
next mapEntityToDataSource(_entityCtx, _dataSourceCtx);
switch (_dataSourceCtx.name())
{
case dataEntityDataSourceStr(Entity1, ThirdTable):
ThirdTable thirdTable = _dataSourceCtx.getBuffer();
thirdTable.RefRecId = this.LineRecId;
break;
}
}
Hi Martin,
When you say beneficial for queries, do you mean why i do select statement and put those 4 fields in where condition like this:
select *From custInvoiceJour where InvoiceId == xx && InvoiceDate ==yy && NumberSequenceGroup == zz && RecId == aa;
but if i have "aa" value, then shouldn't i do this directly instead?
select *From custInvoiceJour where custInvoiceJour.RecId == aa;