Hi,
i need your help ![]()
I’ve a public function in a Script library correctly declared in a “Options” module of form.
I call this function from a “QueryOpen” avent, passing the NotesUiDocument argoument but, when i create a “NotesItem” object i’ve an error “Object Variable Not Set”.
Following, before the “QueryOpen” event code and after the function Code with the breackpoint error:
Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
Dim v_CheckAccess As Variant
v_CheckAccess = fn_checkAccess(Source)
If v_CheckAccess = True Then
continue = True
Else
continue = False
End If
End Sub
Public Function fn_CheckAccess(obj_Source As NotesUIDocument)
'On Error Resume Next
'____________________________________________________________________________________________________________
Dim obj_S As NotesSession
Dim obj_db As NotesDatabase
Dim obj_ws As NotesUIWorkspace
Dim obj_doc As NotesDocument
Dim obj_utenti As NotesItem
Dim obj_figura As FigureProfessionali
Dim v_respCed As String
Dim v_analyst As String
'____________________________________________________________________________________________________________
Set obj_db = obj_S.CurrentDatabase
Set obj_doc = obj_Source.Document
Set obj_utenti = obj_doc.GetFirstItem("contact_lstSecurity")--------- BREAKPOINT ERROR
Set obj_figura = New FigureProfessionali
'____________________________________________________________________________________________________________
If(obj_source.IsNewDoc) Then
fn_CheckAccess = True
Else
Call obj_figura.pax(50)
v_respCed = obj_figura.Personale
Call obj_figura.pax(100)
v_analyst = obj_figura.Personale
If obj_S.CommonUserName = v_RespCed Or obj_S.CommonUserName = v_analyst Then
fn_CheckAccess = True
Else
Forall v In obj_source.document.contact_lstSecurity
If v = obj_S.CommonUserName Or v = "" Then
fn_CheckAccess = True
End If
End Forall
If Not existvalue Then
Call Messaggi (102, "System", obj_utenti.text)
fn_CheckAccess = False
End If
End If
End If
End Function
Someone can help me to understand this error ?? :-))
Thanks