Hope anyone is better than me at LS. I use this in a form (Button).When a press the button a call correspondencemail(ScriptLibraries) and it’s work fine.
Now a will move this function to a button in a view, how will achange the LS. I tried some things but it’s not work.
I now that i could not use workspace.CurrentDocument and so but i don’t get it to work.
Anyone who could help me to the right track.
Dim session As New notessession
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Set uidoc = workspace.CurrentDocument
Set doc = uiDoc.Document
whenNow$ = Today()
Call uidoc.FieldSetText("AvslDat",whenNow$)
Call uidoc.FieldSetText("AvslTime",Time$())
Call uidoc.FieldSetText("AvslAv",Cstr(session.CommonUserName))
Call uidoc.FieldSetText("Status", "Closed")
Call uidoc.Save
Call uidoc.Close
If uiDoc.FieldGetText("notifyUser") <> "" Then
Call correspondencemail ("Close")
End If
Kind regards
David