Wednesday, 18 May 2016

WorkFlow Approver Name and Date Time

HI, Below code used to get workflow approve name based on purchase order Id or RecId.

select firstonly workflowTrackingStatusTable
order by RecId desc
where workflowTrackingStatusTable.ContextTableId == tableNum(PurchTable)
&& workflowTrackingStatusTable.ContextRecId == purchTable.RecId
&& workflowTrackingStatusTable.TrackingStatus == WorkflowTrackingStatus::Completed;
select * from workflowTrackingTable
order by CreatedDateTime desc, RecId desc
where workflowTrackingTable.WorkflowTrackingStatusTable == workflowTrackingStatusTable.RecId
&& workflowTrackingTable.TrackingContext == WorkflowTrackingContext::WorkItem
&& workflowTrackingTable.TrackingType == WorkflowTrackingType::Approval;
select firstOnly dirPersonUser
order by ValidTo desc
where dirPersonUser.User == workflowTrackingTable.User;
select dirPerson
where dirPerson.RecId == dirPersonUser.PersonParty
join hcmWorker
where hcmWorker.Person == dirPerson.RecId;
select hcmPositionWorkerAssignment
order by ValidTo desc
where hcmPositionWorkerAssignment.Worker == hcmWorker.RecId
join hcmPosition
where hcmPosition.RecId == hcmPositionWorkerAssignment.Position;
name = dirPerson.Name;
select * from workflowTrackingCommentTable where workflowTrackingCommentTable.WorkflowTrackingTable == workflowTrackingTable.RecId;
approvedBy = strFmt(“@SYS3492” + ‘ < %1, %2 – %3 >’, name,
hcmPosition.description(),
DateTimeUtil::applyTimeZoneOffset(workflowTrackingCommentTable.createdDateTime, DateTimeUtil::getCompanyTimeZone()));

1 comment:

  1. I need Ax 2012 TEch training.Please contact safeerps007@gmail.com

    ReplyDelete

Repeat the heading to the next page in SSRS Reports: To repeat the table header in the next page, follow these steps: ⦁    Open the repo...