In WorkFlow, Script Editor
I am trying to implement to update a certain field of father requirement when a certain field of child requirement is changed.
I wrote a macro as below. however, I am trying to get the father requirement by using ReqFactory Item, i received an error message in the red marked parts that i need an object. coudl you please help me on this?
<CODE>
Sub Req_FieldChange(FieldName)
' On Error Resume Next
if FieldName = "RQ_REQ_STATUS" and Req_Fields (FieldName).value = "Passed" then
Update_Father Req_Fields ("RQ_FATHER_NAME").value
end if
' On Error GoTo 0
End Sub
Public SubUpdate_Father (RQ_FATHER_ID)
' Get the requirement Factory.
Dim rFact 'As ReqFactory
Set rFact = TDConnection.ReqFactory
Dim father_req 'As Req
Set father_req = rFact.Item(RQ_FATHER_ID)
father_req .Field("RQ_USER_07").value = 5
End Sub