Tuesday, November 16, 2010

To print comments related to workflow

This code helps you to print the comments related to a workflow.

static void printWorkFlowComments(Args _args)
{
SmmLeadTable smmLeadTable;
WorkFlowTrackingTable workFlowTrackingTable;
WorkflowTrackingCommentTable workflowTrackingCommentTable;
;
smmLeadTable.RecId = 5637145827;////smmLeadTable buffer //// Change the table where the workflow is enabled.

while select workFlowTrackingTable order by RecId asc where workFlowTrackingTable.ContextRecId == smmLeadTable.RecId
{
select firstonly workflowTrackingCommentTable where workflowTrackingCommentTable.TrackingId == workFlowTrackingTable.TrackingId;
if(workflowTrackingCommentTable)
{
print workflowTrackingCommentTable.Comment;
print workflowTrackingCommentTable.TrackingMessage;
}
}
pause;
}

No comments:

Post a Comment