Rename primary key values in axapta


 LedgerTable ledgerTable;  
 ;  
 select firstonly ledgerTable  
 where ledgerTable.AccountNum == 'B10110';  
 if (ledgerTable.RecId)  
 {  
 ledgerTable.AccountNum = 'A' + ledgerTable.AccountNum;  
 ledgerTable.renamePrimaryKey();  
 }