Monday, November 5, 2012

Renaming the primary key



//Open the AOT, create a new job named CustAccountRename, and enter the
//following code.


static void CustAccountRename(Args _args)
{
CustTable custTable;
select firstOnly custTable
where custTable.AccountNum == '1103';
if (custTable.RecId)
{
custTable.AccountNum = '1103_';
custTable.renamePrimaryKey();
}
}

No comments: