Thursday, January 21, 2016

Get Workflow Multiple approval users ax 2012

static void  WorkflowTest(Args _args)
{
    WorkflowTrackingStatusTable workflowTrackingStatusTable;
    WorkflowTrackingTable WorkflowTrackingTable;
    WorkflowApprovalName approvername;
    boolean first = true;   
    container       approver;
    int i;
    ;
   
    while select workflowtrackingstatustable
            where workflowtrackingstatustable .ContextRecId == 5637146089
                && workflowtrackingstatustable.WorkflowType == WorkflowTrackingStatusWorkflowType::Workflow
                && workflowtrackingstatustable.TrackingStatus == WorkflowTrackingStatus::Completed
    join workflowtrackingtable order by RecId Asc
    where  workflowtrackingtable.TrackingContext == workflowtrackingcontext::WorkItem
    && (workflowtrackingtable.TrackingType == workflowtrackingtype::Approval
        || workflowtrackingtable.TrackingType == workflowtrackingtype::Completion)
    && workflowtrackingtable.WorkflowTrackingStatusTable == workflowtrackingstatustable .recid
    {
        if(first)
        {
            first = false;
            continue;
        }
        else
        {
            approver += workflowtrackingtable.User;
            //approvername = workflowtrackingtable.User;
            //info(strFmt("%1",approvername));
        }
    }
    for(i=1;i<=conLen(approver);i++)
    {
        approvername = conPeek(approver,i);
        info(strFmt("%1",approvername));
    }
   
}

No comments:

Post a Comment

Copy Markup charges while posting purchase invoice using X++

 Copy Markup charges while posting purchase invoice using X++ Class: Important: Code logic is just for Reference.  New class => Duplicate...