HI ,
Trying to access the logical folders from a custom form Using below Code . Its returning the fileServersuccess value as false . But the error message is blank . Any one ever tried this?
'FileServerOperation
fileContentBase64String = TextToBase64String(fileContent.ToString())
ThisForm.GetSecondaryIDOCollection(2).SetObjectProperty("BinaryContent", 0, fileContentBase64String)
fileServersuccess = Application.FileServer.ExportToFileSeverFromCollection(ThisForm.Name, "object2", "BinaryContent", fileServer,
logicalFolderName, fileSpec, 0, fileServererrMsg)
If Not fileServersuccess Then
Application.ShowMessage(fileServererrMsg)
Else
'Show Success Message
ThisForm.CallGlobalScript("MsgApp",
"Clear",
"Prompt",
"SuccessFailure",
"mI=FileGenerated",
IO.Path.GetFileName(sFileFullPath),
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "")
End If
End Sub
Function GetFileSpec(ByVal folderTemplate As String, ByVal fileName As String,
ByVal fileExtension As String, ByVal accessDepth As String,
ByVal useServerCheck As Boolean) As String
Dim useServerCheckStr As String
Dim fileSpec As String = String.Empty
If useServerCheck Then
useServerCheckStr = "1"
Else
useServerCheckStr = "0"
End If
If fileName.LastIndexOf("") >= 0 Then
fileName = fileName.Substring(fileName.LastIndexOf("")).TrimStart(""c)
End If
fileSpec = folderTemplate.TrimEnd("/"c) + "" + fileName + "|" + fileExtension + "|" + accessDepth + "|" + useServerCheckStr
Return fileSpec
End Function
Function TextToBase64String(ByVal text As String) As String
Dim textInBytes As Byte() = System.Text.ASCIIEncoding.ASCII.GetBytes(text)
Return Convert.ToBase64String(textInBytes)
End Function
Thanks