Yong Kheng Foo 29.Sep.11 12:02 AM a Web browser Lotus Workflow ArchitectAll ReleasesWindows XP
Dear all expert,
I have the following code with the postsave:
Sub Postsave(Source As Notesuidocument)
Dim workspace As New NotesUIWorkspace
Set source = workspace.CurrentDocument
Dim session As New notessession
Dim db As notesdatabase
Set db = session.currentdatabase
Set doc = New notesdocument(db)
Dim thisdoc As NotesDocument
Dim item As notesitem
If source.FieldGetText("zEmployeerehire") ="" Then
Msgbox "Please justify whether the employee should be rehire and the system to delete from!"
Call source.GotoField("zEmployeerehire")
Exit Sub
End If
If source.FieldGetText("zUserdeletefromsystem") ="" Then
source.FieldGetText("zUserdeletefromsystem_1")<>""
source.FieldGetText("zUserdeletefromsystem_2")<>""
source.FieldGetText("zUserdeletefromsystem_3")<>""
source.FieldGetText("zUserdeletefromsystem_4")<>""
Else
Msgbox "Please select a system for deletion"
call source.GotoField("zUserdeletefromsystem")
End If
End Sub
but it will prompt an error message: Incorrect argument type: string expected when user try to save the document by leaving the zUserdeletefromsystem = ""
And when user select the zUserdeletefromsystem field, it will promt the msgbox. What I wish to get from this code is, either one of the zUserdeletefromsystem field must be check else will prompt the msgbox.
(all the 5 zUserdeletefromsystem field is a checkbox)