How to get workflow approvers list using x++


WorkflowTable           workflowTable;
WorkflowVersionTable    workflowVersionTable;
WorkflowElementTable    workflowElementTable;
WorkflowStepTable       workflowStepTable;
WorkflowAssignmentTable workflowAssignmentTable;
while select workflowAssignmentTable
    join workflowStepTable
    where workflowStepTable.RecId == workflowAssignmentTable.workflowStepTable
    join workflowElementTable
    where workflowElementTable.ElementId == workflowStepTable.ElementId
    join workflowVersionTable
    where workflowVersionTable.ConfigurationId == workflowElementTable.ConfigurationId
        && workflowVersionTable.Enabled == NoYes::Yes
    join workflowTable
    where workflowTable.RecId == workflowVersionTable.workflowTable
    && workflowTable.DocumentTableName == "LeaveRequestHeader"
{
    info(strFmt("%1", workflowAssignmentTable.UserValue));
}
          


Comments

Popular posts from this blog

SSRS Report using Controller , Contract and RDP classes in D365

Exporting data to Excel through X++ code

COC for Form level method

How to pass the parameter from one form to another in Dynamic365

Multi Select Lookup in SSRS Report in D365