Workflow Approver NAME

Below is the Job Snippet to get the Workflow Approver Name

static void workflowApproverInfo(Args _args)
{
WorkflowTrackingStatusTable workflowtrackingstatustable;
WorkflowTrackingTable workflowtrackingtable;

while select workflowtrackingstatustable
order by RecId desc
join workflowtrackingtable
where workflowtrackingstatustable.ContextRecId == 5637155826 //(Required Record)
&& workflowtrackingtable.TrackingContext == workflowtrackingcontext::WorkItem
&& workflowtrackingtable.TrackingType == workflowtrackingtype::Approval
&& workflowtrackingtable.WorkflowTrackingStatusTable == workflowtrackingstatustable .recid
{

info(workflowtrackingtable.User);

info(HcmWorker::find(DirPersonUser::findUserWorkerReference(workflowtrackingtable.User)).name());
}
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s