CreateFolderFunction Error - Description: Path not found . ^ Line=27 Pos=40 (4 replies)
Some additional info. Looks like the job runs fine if the folder pre-exists. But if the job has to create a new folder, it's erroring out. Here's an example of what is written to the Errors.txt file:
Error whilst evaluating field [CreateFolderFunction] on transaction type [Record].
Resolved Function - CreateFolderFunction
Error - Path not found
Call Stack: VBWrapper.Evaluate(sEvaluation={Text}, sField='CreateFolderFunction', bForceEval=False)
Value Of sEvaluation:
'Dim Dir
Dir = "\\networkshare\GroupDocs\Sage300\ECHOAP\Customers\" & %customer & "\Invoices\" & %Year
CreateFolder(Dir)'
Env: sResolved='CreateFolderFunction'
Call Stack: TransformMap.PerformTransform() ------------------------------------------------------
Env: sTranId='Record', sField='CreateFolderFunction', sValue='', l=0, m=0
Call Stack: TransformMap.ITransformController_Process() ------------------------------------------
Call Stack: TransformCoordinator.RunTransform(sTransformId='CreateFolder') -----------------------
Env: eTransformType=5, bWriteSummaries=False, bSummariesHandled=False
Call Stack: TransformCoordinator.RunTransformStream(sParentTransform='') -------------------------
Env: sTransformId='CreateFolder', l=0, m=0
Call Stack: TransformCoordinator.Process() -------------------------------------------------------
Call Stack: IntManEng.Main() ---------------------------------------------------------------------
Env: sCmd='"ECHOAP_OEINV020"'
Looks like I can create a folder locally using the IMAN function, but I can't create one on the network share.
Arline, this is permissions related.
You may be interested in that Product Update 5 now includes the ability to create folders as part of the Write transforms.
Hm. Can you be more specific about what permissions need to change? This functionality was working on the same product update, on another server. The IMAN service that creates the folder has 'Full control' of the parent folder and subfolders, so why can it not create a new folder?
Looks like I'm on PU 4:
Realisable.IManWebUI.DLL 4.2.0.0
Product Update: Product Update 4
Config Version: 4.25
DB Version: 4.20
Looking for some advice on folder creation.
My CreateFolder function was working fine until the client had to rebuild servers - so now I'm re-testing IMAN jobs in a new environment and am running into this 'path not found' issue.
When I log into the IMAN server as the Windows user running the IMAN services, I am able to create and delete folders and files in the intended directory.
But it seems like when I try to invoke IMAN to do this, it's not allowed to do so. I'm assuming (?) this is a Windows permissions issue but can't prove it.
Any ideas on best way to troubleshoot this?
Here are some details.
ERROR:
Error whilst evaluating field [CreateFolderFunction] on transaction type [Record].
Resolved Function - CreateFolderFunction Error - Description: Path not found . ^ Line=27 Pos=40
MAP TRANSFORM:
Dim Dir
Dir = "\\networkshare\GroupDocs\Sage300\ECHOAP\Customers\" & %customer & "\Invoices\" & %Year
CreateFolder(Dir)
FUNCTION :
Function CreateFolder(sFolder)
Dim sPathSegments, sSubDir, sPath, oFs
Dim bUNC, l
Set oFs = CreateObject("Scripting.FileSystemObject")
bUNC = sFolder "" And Left(sFolder, 2) = "\"
If bUNC Then
sFolder = Mid(sFolder, 3)
End If
sPathSegments = Split(sFolder, "")
If bUNC Then
sPathSegments(0) = "\" & sPathSegments(0)
End If
sPath = ""
For l = 0 To UBound(sPathSegments)
sSubDir = sPathSegments(l)
If sPath "" Then sPath = sPath & ""
sPath = sPath & sSubDir
If Not bUNC Or bUNC And l >= 2 Then
If oFs.FolderExists(sPath) = False Then oFs.CreateFolder (sPath)
End If
Next
CreateFolder = sPath
End Function