Quantcast
Channel: Microsoft Dynamics 365 Community
Viewing all articles
Browse latest Browse all 64797

Query to get workflow last comment in Ax 2012

$
0
0
I want to highlight Query to get workflow last comment in Ax 2012. You can use ,WorkflowTrackingTable,WorkflowTrackingStatusTable  and WorkflowTrackingCommentTable   to get Last comment entered by used on submitting or approving workflow for module

WorkflowTrackingTable           workflowTrackingTable;
    WorkflowTrackingStatusTable     workflowTrackingStatusTable;
    WorkflowTrackingCommentTable    workflowTrackingCommentTable;
PurchTable PurchTable;

select PurchTable where PurchTable.PurchId ="PO13000003";

    select ContextCompanyId, ContextTableId, ContextRecId from workflowTrackingStatusTable
        where workflowTrackingStatusTable.ContextCompanyId    == curext()
           && workflowTrackingStatusTable.ContextTableId      == PurchTable.TableId
           && workflowTrackingStatusTable.ContextRecId        == PurchTable.RecId
        join firstonly TrackingId, CreatedDateTime from workflowTrackingTable order by CreatedDateTime desc
            where workflowTrackingTable.WorkflowTrackingStatusTable == workflowTrackingStatusTable.RecId
        join Comment from workflowTrackingCommentTable
            where workflowTrackingCommentTable.WorkflowTrackingTable == workflowTrackingTable.RecId;

    info( workflowTrackingCommentTable.Comment);

Viewing all articles
Browse latest Browse all 64797

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>