Merge Two Records In Ax 2012
static void CookBookEX18(Args _args)
{
ReasonTable reasonTableDelete;
ReasonTable reasonTable;
;
ttsBegin;
select firstOnly forUpdate reasonTableDelete
where reasonTableDelete.Reason == 'Counter';
select firstOnly forUpdate reasonTable
where reasonTable.Reason == 'Auction';
reasonTableDelete.merge(reasonTable);
reasonTable.doUpdate();
reasonTableDelete.doDelete();
ttsCommit;
}
{
ReasonTable reasonTableDelete;
ReasonTable reasonTable;
;
ttsBegin;
select firstOnly forUpdate reasonTableDelete
where reasonTableDelete.Reason == 'Counter';
select firstOnly forUpdate reasonTable
where reasonTable.Reason == 'Auction';
reasonTableDelete.merge(reasonTable);
reasonTable.doUpdate();
reasonTableDelete.doDelete();
ttsCommit;
}
No comments:
Post a Comment