AX 2012 Get Workflow Approver in Purchase Requistion Module

//Pass the Purchase Requisition Rec ID

public WorkflowTrackingTable mscGetWorkflowApprover(RecId _purchReqId)
{
    WorkflowTrackingTable           workflowTrackingTable;       
    WorkflowTrackingStatusTable     workflowTrackingStatusTable;
   
    select firstOnly workflowTrackingTable
        where workflowTrackingTable.TrackingType == WorkflowTrackingType::Completion
        join workflowTrackingStatusTable
            where workflowTrackingTable.WorkflowTrackingStatusTable == workflowTrackingStatusTable.RecId
                && workflowTrackingStatusTable.ContextRecId == _purchReqId;
   
    return workflowTrackingTable;
}

Comments

Popular posts from this blog

AX 2012 R3: Cannot edit a record in Purchase order - update table (PurchParmTable).

AX 2012: The AOS server name or instance name is not correctly configured

AX 2012 Get Financial Dimension Value by Worker RecID