폴더에 특정 하위 문서의 고유 ID로 채워진 AUNID
필드가있는 문서가 있습니다. 폴더의 작업 표시 줄에는 사용자가 편집 할 수있는 AUNID
과 관련된 문서를 여는 데 필요한 버튼이 있습니다. 동작 버튼을 누르면 문서를 편집 할 때 UNID가 유효하지 않습니다.
Invalid UNID; UNID must be a 32-digit hex string.
을 'OK'그러나 정확한 문서 편집 열리고 누르면. 나는 디버거를 사용했고 코드는 모두 내가 예상했던대로 정확히 실행하지만,이 오류는 아무런 이유없이 보이는 것처럼 튀어 나온다.
Sub Click(Source As Button)
On Error Goto handleError
Dim ws As New NotesUIWorkspace
Dim s As New NotesSession
Dim leaddoc As NotesDocument
Dim action As NotesDocument
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesUIDocument
Set db = s.CurrentDatabase
Set leaddoc = db.UnprocessedDocuments.GetFirstDocument
Set view = db.GetView("(ActionsByLead)")
If (leaddoc.GetFirstItem("AUNID").Text = "") Then
Msgbox ("There is nothing to edit!")
Exit Sub
End If
Dim uid As String
uid = Cstr(leaddoc.GetFirstItem("AUNID").Text)
Set action = db.GetDocumentByUNID(uid)
Call ws.SetTargetFrame("")
Call ws.EditDocument(True, action,,,, False) 'Error occurs on this line according to the debugger.
Exit Sub
handleError:
Resume Next
End Sub
오류가 발생했을 때 uid 값은 무엇입니까? –
마이클이 말한 것과 플러스는 "액션이 아무것도 아닌가?" 또한, 오류 처리기는 적어도 오류 $ 및 Erl을 인쇄해야합니다. 그러면 문제가 있는지 알 수 있습니다. – Eric
@MichaelRuhnau 편집하려는 문서의 유효한 문서입니다. –