Hi,
Does any one knows how to assign a value to a field on a common table?
->
Common source, destination;
DictTable dictTable;
;
dictTable = new DictTable(77); //77 is CustTable
source = dictTable.makeRecord();
destination = dictTable.makeRecord();
destination.data(source);
/*
here I would like to change on field e.g. destination.custName = 'aaa'
but I get the error
*/
destination.insert();
<-
the above code is used to duplicate a record (in this case CustTable record).
It should be made that way because the user specifies on which table a replication should be made so tableId is used.
My question is how can I change field values on common object.
Best Regards
Sebastian Widz
0
Comments
You can proceed as follows:
source = custTable::find('4001');
destination.clear();
destination = source.data();
destination.(fieldnum(CustTable,accountnum)) = "5003";
destination.insert();
Regards,
CD
Ciprian Dudau
Axapta Developer