Hi,
I am trying to capture the comments that the approvers enter while completing a workflow activity, and append them to the comments on the Item.
I have tried doing this on the "Activity" Server event on "on Vote" event, but the comment value is null or blank, possibly because the value is still not updated in the db.
<Code>
Dim MyInn As Innovator = Me.getInnovator()
Dim CtrlItem As Item = MyInn.newItem("Activity", "Get Controlled Item")
CtrlItem.setID(Me.getID())
CtrlItem = CtrlItem.apply()
Dim ActivityAsgn As Item = MyInn.newItem("Activity Assignment", "get")
ActivityAsgn .setAttribute("select", "id,state,current_state,buyer,comments,related_id(keyed_name)")
'ActivityAsgn .setProperty("current_state", "Active")
ActivityAsgn .setProperty("source_id", Me.getID())
ActivityAsgn = ActivityAsgn .apply()
'
For I As Integer = 0 To (ActivityAsgn .getItemCount() - 1)
Dim CurrActAs As Item = ActivityAsgn .getItemByIndex(I)
Dim currIden As String = ActivityAsgn .getItemByIndex(I).getRelatedItem().getProperty("keyed_name")
Dim strComm As String = CurrActAs.getProperty("comments")
Next I
<!Code>
To complicate things, there are 3 Approvers, A B and C, the comment has to be against each approver
eg. :
A : Comments from A
B : Comments from B
C: Comments from C
Thank you,
Naveen