Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

Tuesday, November 22, 2016

Dequeue all the workflow jobs in AX 2012

// To dequeue all the workflow for workflow performance

static void DequeueWorkFlow(Args _args)
{
SysWorkflowMessageTable     SysWorkflowMessageTable;
    ttsBegin;
    while select forUpdate SysWorkflowMessageTable where SysWorkflowMessageTable.MessageLifeCycleState !=2

        {
            SysWorkflowMessageTable.MessageLifeCycleState =2;
            SysWorkflowMessageTable.update();
    }
    ttsCommit;
}

Regards,

No comments:

Post a Comment

How find size of recordsortedlist in D365/AX 2012

Hi, This is the continuity of the previous article where we are now getting the size of recordsortedlist . if(recordsortedlist.len() >1) ...