I have the change order and the file, but I can't figure out how to add the file to the change order. Do I do it through the DocumentService of the file, or the ChangeOrderService? I have the ID of both, just can't tie them together. Also is there a way to specify the file to be added to the Records or the File tab.
Thanks
Solved! Go to Solution.
Solved by minkd. Go to Solution.
I'm not sure if I can use Nothing in these arguments, but either way I get an error 109 when I run this code...
Dim Files(0) As Long
Files(0) = FileID
Dim ECO As ChangeOrder = mgr.ChangeOrderService.GetChangeOrderByNumber(ECONo)
ECO = mgr.ChangeOrderService.UpdateChangeOrder(ECO.Id, ECO.Num, ECO.Title, ECO.Descr, ECO.Deadline, Nothing, Nothing, _
Files, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing)
I found the problem. I forgot to open the ECO for editing. This fixed the problem...
ECO = mgr.ChangeOrderService.EditChangeOrder(ECO.Id)