Hi Friends,
i have added a field in purchline table i.e “GrossWeight”. I need to populate data into this field from inventable
When ever i select a item no in the purcline fields data populated automatically in price & Units Table. As well a i need to populate the Grossweight fileld from invent table.
i.e inventTable.NetWeight+inventTable.TaraWeight;
To achive this i wrote fallowing methods in purchline Table:
GrossWeight ItemgrossWeight(Itemid _itemid =this.ItemId)
{
InventTable inventTable;
;
if (_itemId)
select firstonly inventTable
index hint ItemIdx
where inventTable.ItemId == _itemId;
return inventTable.NetWeight + inventTable.TaraWeight;
}
And call the method from purchline modifiedfeld mehod:
case fieldnum(PurchLine, GrossWeight):
this.GrossWeight=this.ItemgrossWeight();
break;
But it not works…Any help.