Sample code in X++ to update the few records...
Static void main updateIds(Args args)
{
EmplTable
empltable;
Ttsbegin;
while select forUpdate EmplTable
Index hint EmplIdIdx
where EmplTable.EmplId == ‘10001’;
where EmplTable.EmplId == ‘10001’;
If(emplTable.recId != 0)
{
emplTable.EmplId = ‘10101’(New EmplId);
EmplTable.renamePrimaryKey();
EmplTable.update()
}
Else
{
{
Info(‘employee not found’);
}
}
ttsCommit;
}
No comments:
Post a Comment