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

SQL code to upate one Legal entity banner to all the legal entity in D365

 Hi, update companyimage set  companyimage.Image  = companyimageA.Image  from  ( select Image from companyimage where dataAreaid = 'USF...