≡ Menu

Workflow Approve Name  in Grid Dynamics Ax 2012 R3

Small tip, with reference at the end of post. I got small task, User want Last approval Name in grid at the result.

I wrote following code snippet as method in a required table and bind it to grid field.


display Name LastApprovalName()


WorkflowTrackingStatusTable workflowTrackingStatus;

WorkflowTrackingTable workflowTrackingTable;

WorkflowTrackingCommentTable workflowTrackingCommentTable;

UserInfo userInfo;

RecId _recId;

Name _name;


select firstFast RecId, User from workflowTrackingTable

order by RecId desc

join workflowTrackingCommentTable

where workflowTrackingCommentTable.WorkflowTrackingTable == workflowTrackingTable.RecId

join UserInfo

where UserInfo.id == WorkflowTrackingTable.User

exists join workflowTrackingStatus

where workflowTrackingTable.WorkflowTrackingStatusTable == workflowTrackingStatus.RecId

&& workflowTrackingStatus.ContextRecId == this.RecId

&& workflowTrackingStatus.ContextTableId == tableNum(MyTablelRequestTable) //PurchTable

&& workflowTrackingTable.TrackingType == WorkflowTrackingType::Approval;

if (workflowTrackingTable.RecId > 0)









return _name;





Original Code snippet is https://community.dynamics.com/ax/b/amazingax1/archive/2016/04/28/microsoft-dynamics-ax-2012-get-workflow-last-approver-name-and-approved-date

{ 0 comments… add one }

Leave a Comment