1. if we want to add a field to the entity, do we need to add it to the staging table in order to be able to import/export successfully? or does it work without adding the field to staging table?
[ExtensionOf(tableStr(SalesOrderLineV2Entity))]
final class SalesOrderLineV2Entity_Extension
{
public void mapEntityToDataSource(DataEntityRuntimeContext _entityCtx, DataEntityDataSourceRuntimeContext _dataSourceCtx)
{
next mapEntityToDataSource(_entityCtx, _dataSourceCtx);
switch (_dataSourceCtx.name())
{
case dataEntityDataSourceStr(SalesOrderLineV2Entity, SalesLine):
//SalesLine salesLine = _dataSourceCtx.getBuffer() as SalesLine;
break;
case dataEntityDataSourceStr(SalesOrderLineV2Entity, Table1):
//Table1 table1 = _dataSourceCtx.getBuffer() as Table1;
Table1 table1Local;
select firstonly table1Local where table1Local.Id == this.Id
&& table1Local.CodeY == this.ItemNumber
&& table1Local.CodeX == this.CodeX
&& table1Local.IsActive == true;
this.Table1RecId = table1Local.RecId;
break;
}
}
}
André Arnaud de Cal... 291,885 Super User 2024 Season 2
Martin Dráb 230,569 Most Valuable Professional
nmaenpaa 101,156