I have added data of field "Data" exists in "WhsWorkLineCustom" table to "InventSum" table to the form "InventOnHandItem" and make them available for filtering and sorting using the standard filter function in the form grid .
I have tried several approaches without luck.
I have tried this code and when I do a debug the recId of "inventSum" Table is always null.
[ExtensionOf(tableStr(WHSWorkLine))]
final class WHSWorkLine_DEM_T_Extension
{
public void update()
{
next update();
InventDim InventDim;
WHSWorkLine wHSWorkLine;
WHSWorkTable wHSWorkTable;
InventSuminventSum;
WHSWorkLineCustom wHSWorkLineCustom;
wHSWorkLineCustom = wHSWorkLineCustom::find(this.WorkId,this.LineNum);
if (this.WorkType == WHSWorkType::Custom)
{
wHSWorkTable= WHSWorkTable::find(this.WorkId);
{
select forupdate inventSum where InventSum.InventDimId== InventDimId.InventDimId;
if (inventSum )
{
inventSum.Data = wHSWorkLineCustom.Data;
inventSum.update();
}
}
}
}
}