最新消息:ww12345678 的部落格重装上线,希望大家继续支持。

Dynamics Ax 2012 R3 网格窗体的工作流批准名 / Workflow Approve Name  in Grid Dynamics Ax 2012 R3

网络文摘 alirazazaidi 1273浏览 0评论

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;

_recId=5637145391;

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)

{

_name=userInfo.name;

 

}

else

{

_name='';

}

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

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址