Hello all - I’m having an issue trying to send a text file to a shared directory using LEI.
I’ve ran through the LEI help docs and I’m pretty certain I’ve got it set up correctly.
Connection type = File System
Activity Type = Scripted
the SERVICE has full access to the directory
I can connect and generate the file to the share directory from my laptop when I have the share mapped.
When I run the lei activity, the activity runs for 1 second and ends without an error.
I don’t see the LEI service account even open a connection to the server where the share resides.
Does the LEI Server need to have the Share mapped for it to work?
Thanks for your help in advance.
Here is the agent code:
Sub Initialize
Dim Session As NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim fileNum As Integer, I As Integer
Dim fileName As String
Dim xxAppointmentType As Variant
Dim TaskType As Variant
Dim xxLocation As Variant
Dim nam As NotesName
Dim xxChair As Variant
Dim xxRoom As Variant
Dim xxSubject As Variant
Dim ExpValue As Variant
Dim CalEntry As String
Set Session = New NotesSession
Set db = session.CurrentDatabase
Set View = db.GetView("($Calendar)")
Set doc = view.GetFirstDocument
' Get an unused file number so LotusScript can open a file.
fileNum% = Freefile()
’ fileName$ = "C:\tmp" & doc.UniversalID & “.txt”
’ fileName$ = “C:\tmp" & Format(Now(), “mmddyyyy”) & Format(Time(), “hhmmss”) &”.txt"
fileName$ = "\\NJROS1BBLA0197\Retirement_Portal$\PortalCal.txt"
’ Write out some employee data.
Open fileName$ For Output As fileNum%
Do While Not(doc Is Nothing)
TaskType = doc.getItemValue("TaskType")
Set nam = New NotesName(doc.Chair(0))
xxAppointmentType = doc.AppointmentType(0)
xxRoom = doc.Room(0)
xxChair= nam.Common
xxSubject = doc.Subject(0)
If xxAppointmentType<>"3" Then
Goto flag
Else
xxRoom = "Room: " & doc.Room(0)
End If
If xxAppointmentType = "3" Then
xxChair = "Chair: " & xxChair
Elseif TaskType = "2" Then
xxChair = "Owner: " & xxChair
End If
flag:
If Not Isnull(doc.Location) Then
xxLocation = "Location: " & doc.Location(0)
Else
xxLocation = ""
End If
CalEntry = xxSubject & "~" & xxRoom & "~" & xxLocation & "~" & xxChair
'Messagebox (CalEntry)
ExpValue = doc.StartDateTime(0) & "~" & doc.EndDateTime(0) & "~" & CalEntry
k=999
newhold = ExpValue
'Messagebox (ExpValue)
Print #fileNum%, ExpValue
Set doc = view.GetNextDocument(doc)
Loop
Close fileNum%
End Sub