get last WorkFlow Comment. AX 2012

just add this code to tables method and drag it to the grid

display public server str aiComment()
WorkflowTrackingStatusTable trackingStatusTable;
WorkflowTrackingTable trackingTable;
WorkflowTrackingCommentTable trackingCommentTable;
WorkflowComment commentLoc = “”, comment;

while select trackingStatusTable where trackingStatusTable.ContextRecId == this.RecId join trackingTable
where trackingTable.WorkflowTrackingStatusTable == trackingStatusTable.RecId join trackingCommentTable
where trackingCommentTable.WorkflowTrackingTable == trackingTable.RecId && trackingCommentTable.Comment != commentLoc
comment = trackingCommentTable.Comment;

return comment;

by : _fiant


Leave a Reply

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

You are commenting using your 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