From 199904b69556fe25b6edb1ab5d4cea78134fa28f Mon Sep 17 00:00:00 2001 From: OlgunR Date: Tue, 6 May 2025 16:36:52 +0200 Subject: [PATCH] =?UTF-8?q?Defaultwert=20f=C3=BCr=20E-Mails=20ohne=20Betre?= =?UTF-8?q?ff=20-=20frmIndex?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Global_Indexer/frmIndex.vb | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/Global_Indexer/frmIndex.vb b/Global_Indexer/frmIndex.vb index e2f8b9f..cb9e9b2 100644 --- a/Global_Indexer/frmIndex.vb +++ b/Global_Indexer/frmIndex.vb @@ -922,13 +922,13 @@ Public Class frmIndex Next End If If DropType = "|OUTLOOK_MESSAGE|" Or DropType = "|FW_MSGONLY|" Or DropType = "|MSGONLY|" Or CURRENT_NEWFILENAME.ToUpper.EndsWith(".MSG") Or CURRENT_NEWFILENAME.ToUpper.EndsWith(".EML") Then - indexierung_erfolgreich = SetEmailIndicies(pIndexAttachment:=False) + indexierung_erfolgreich = SetEmailIndicies(False) If indexierung_erfolgreich = False Then MsgBox("Error in SetEmailIndices - See log", MsgBoxStyle.Critical) Return False End If ElseIf DropType = "|ATTMNTEXTRACTED|" Or DropType = "|OUTLOOK_ATTACHMENT|" Then - indexierung_erfolgreich = SetEmailIndicies(pIndexAttachment:=True) + indexierung_erfolgreich = SetEmailIndicies(True) If indexierung_erfolgreich = False Then MsgBox("Error in SetEmailIndices - See log", MsgBoxStyle.Critical) Return False @@ -960,17 +960,18 @@ Public Class frmIndex Dim oTable As DataTable = DATABASE_ECM.GetDatatable(oSQL) If IsNothing(oTable) Then - _Logger.Info("Could not get Email Indicies for DocType = [{0}]. Exiting.", CURR_DOKART_OBJECTTYPE) + _Logger.Info("Could not get Email Indicies for OBJECTTYPE = [{0}]. Exiting.", CURR_DOKART_OBJECTTYPE) Return False End If If oTable.Rows.Count = 0 Then - LOGGER.Warn("Could not get Email Indicies for DocType = [{0}]. Exiting.") + LOGGER.Warn("Could not get Email Indicies for OBJECTTYPE = [{0}]. Exiting.", CURR_DOKART_OBJECTTYPE) + MsgBox($"Definition von Email Indizes für den Objekttyp [{oTable}] fehlt." + vbNewLine + "Bitte informieren Sie Ihren Systembetreuer.", MsgBoxStyle.Critical) Return False End If If oTable.Rows.Count > 1 Then - LOGGER.Warn("Got multiple rows for Email Indicies for DocType = [{0}]. Exiting.") + LOGGER.Warn("Got multiple rows for Email Indicies for OBJECTTYPE = [{0}]. Exiting.", CURR_DOKART_OBJECTTYPE) Return False End If @@ -1004,13 +1005,18 @@ Public Class frmIndex CURRENT_MESSAGEID = oMessageId CURRENT_MESSAGEDATE = oDateIn - CURRENT_MESSAGESUBJECT = oSubject + + If oSubject IsNot Nothing Then + CURRENT_MESSAGESUBJECT = oSubject + Else + CURRENT_MESSAGESUBJECT = "" + End If oIndexNames = New Dictionary(Of String, Object) From { {"IDX_EMAIL_ID", oMessageId}, {"IDX_EMAIL_FROM", oMessageFrom}, {"IDX_EMAIL_TO", oMessageTo}, - {"IDX_EMAIL_SUBJECT", oSubject}, + {"IDX_EMAIL_SUBJECT", CURRENT_MESSAGESUBJECT}, {"IDX_EMAIL_DATE_IN", oDateIn} } Else