I was testing a workflow and I got an error in an InfoPath Client Event.
When the UploadDocumentFromURL executes, I get the error message "Value does not fall within the expected range".
Dim ret As Boolean, errMess As String
FileURL = strWorkSpaceURL + strDocLib + FileName
If spsList.UploadDocumentFromUrl(strWorkSpaceName, FileURL, oByte, True, errMess) Then
'Update the Activity Fields for Cleanup purposes
K2.ActivityInstanceDestination.DataFields("SPFileURL").Value = FileURL
K2.ActivityInstanceDestination.DataFields("SPFileSite").Value = strWorkSpaceName
Else
Throw New System.Exception(errMess)
End If
I have compared this to other workflow's code and I think I'm missing something because I can't get this to work. Any ideas why I get this error?
Thanks in advance,
Monica