Key field mutations

Hello, I was given a csv file with ItemId’s that need to be changed in Axapta. We’ve got Items with various printtypes. An ItemId consists of the PrintType code followed by the ItemId. I’ve made a job that should alter the ItemId’s into the values defined in the csv file. The problem is that i’m altering the ItemId’s directly in the InventTable. By using this method i only change the ItemId in that single table and not throughout all other tables that make use of the ItemId. Is there anyone who knows how to make sure that every connected table gets updated also? ---- This is the code that i’m using now: ==================================== ==================================== static void IGO_LBU_Update_Inventtable_suppartnrs(Args _args) { CommaIo io; Dialog d = new Dialog(“Bijkomende artikelnr’s aanpassen”); DialogField dlgfld = d.addField(typeId(FilenameOpen)); filename filename; container readCon; ItemId ItemId1, ItemIdOldT, ItemIdNwT, ItemIdOldI, ItemIdNwI; IGOPrintType PrintOud, PrintNew; str Bwijzeoud, Bwijzenw, Omschrijving, a, b, c, e; InventTable InventTable; Counter recCnt; // ; if( { filename = dlgfld.value(); if(! winApi::fileExists2(filename)) throw error(“Bestand bestaat niet.”); io = new CommaIo(filename,‘R’); io.inFieldDelimiter(’;’); io.inRecordDelimiter(’\r\n’); while (io.status() == IO_Status::OK) { readCon =; if(conLen(readCon)) { ItemId1 = conPeek(readCon,1); Omschrijving = conPeek(readCon,2); Bwijzenw = conPeek(readCon,3); Bwijzeoud = conPeek(readCon,4); PrintOud = Bwijzeoud; PrintNew = Bwijzenw; a = (“t”+PrintOud+ItemId1); b = (“t”+PrintNew+ItemId1); c = (“i”+PrintOud+ItemId1); e = (“i”+PrintNew+ItemId1); ItemIdOldT = a; ItemIdNwT = b; ItemIdOldI = c; ItemIdNwI = e; while select InventTable where InventTable.ItemId == ItemIdOldT { InventTable.ItemId = (b); InventTable.update(); } } } } } ==================================== ==================================== I hope that someone is willing and able to help me. Thanks in advance! Leo

hi ! Replace the method ‘update()’ with method ‘renamePrimaryKey()’ br,

Thanks alot for the quick response K.K., Immediatly tried it and it solved my problems. gr, Leo