Skip to main content

Posts

Showing posts with the label validate write

Copy record from table in axapta 2012

To Copy record from table in axapta 2012 you can get help from following code. Lets say we want to copy customer c00001 and want new record as D000002 customer account then just you need play with table object and find method. CustTable CustTable1; CustTable CustTable2; CustTable1 = CustTable::find('C00001'); ttsBegin; CustTable2.data(CustTable1); CustTable2.CustTableId = 'D000002'; if (!CustTable2.validateWrite()) { throw Exception::Error; } CustTable2.insert(); ttsCommit;