Resolution:
Note: Before running in any AX environment, Take backup of table and data from SQL for the table(SYSWORKFLOWMESSAGETABLE)
Code snippet:
static void San_WkfjobError(Args _args)
{
SysWorkflowMessageTable sysWorkflowMessageTable;
SysWorkflowTable sysWorkflowTable;
;
ttsBegin;
while Select forupdate sysWorkflowMessageTable
Where sysWorkflowMessageTable.MESSAGELIFECYCLESTATE == 1
&& sysWorkflowMessageTable.ROOTCORRELATIONID
notexists join sysWorkflowTable
where sysWorkflowTable.RootCorrelationId == sysWorkflowMessageTable.RootCorrelationId
{
info(strFmt("%1,%2",sysWorkflowMessageTable.RecId,sysWorkflowMessageTable.AssignedUser));
sysWorkflowMessageTable.MESSAGELIFECYCLESTATE = 2;
sysWorkflowMessageTable.update();
}
ttsCommit;
}
Note: Before running in any AX environment, Take backup of table and data from SQL for the table(SYSWORKFLOWMESSAGETABLE)
Code snippet:
static void San_WkfjobError(Args _args)
{
SysWorkflowMessageTable sysWorkflowMessageTable;
SysWorkflowTable sysWorkflowTable;
;
ttsBegin;
while Select forupdate sysWorkflowMessageTable
Where sysWorkflowMessageTable.MESSAGELIFECYCLESTATE == 1
&& sysWorkflowMessageTable.ROOTCORRELATIONID
notexists join sysWorkflowTable
where sysWorkflowTable.RootCorrelationId == sysWorkflowMessageTable.RootCorrelationId
{
info(strFmt("%1,%2",sysWorkflowMessageTable.RecId,sysWorkflowMessageTable.AssignedUser));
sysWorkflowMessageTable.MESSAGELIFECYCLESTATE = 2;
sysWorkflowMessageTable.update();
}
ttsCommit;
}
No comments:
Post a Comment