Beschreibung:
Liest den letzten Fehlercode eines Objektes aus und gibt eine Fehlermeldung aus.
VBScript:
Dim oOLEError : Set oOLEError = <Object>.LastError ' DocMngr, EmailTool*, SQLShell
Dim nErrorCode : nErrorCode = oOLEError.ErrorCode
Dim sErrorAppendix : sErrorAppendix = oOLEError.ErrorAppendix
Dim sErrorText : sErrorText = oOLEError.ErrorText
Dim nNativeCodeError : nNativeCodeError = oOLEError.NativeErrorCode
Call cRM.DialogMessageBox("Bitte beachten Sie folgende Informationen: " & vbCrLf & "Fehlercode: " & CStr(nErrorCode) & " (Nativer Fehlercode: " & CStr(nNativeCodeError) & ")" & vbCrLf & "Fehlermeldung: " & sErrorText & vbCrLf & "Zusätzliche Fehlerinformationen: " & sErrorAppendix, "OLEError", vbOkOnly)
Set oOLEError = Nothing
C#-Script:
OLEError error = <Object>.LastError; // DocMngr, EmailTool*, SQLShell
long errorCode = error.ErrorCode;
string errorAppendix = error.ErrorAppendix;
string errorText = error.ErrorText;
long nativeErrorCode = error.NativeErrorCode;
cRM.DialogMessageBox("Bitte beachten Sie folgende Informationen: " + System.Environment.NewLine + "Fehlercode: " + errorCode.ToString() + " (Nativer Fehlercode: " + nativeErrorCode.ToString() + ")" + System.Environment.NewLine + "Fehlermeldung: " + errorText + System.Environment.NewLine + "Zusätzliche Fehlerinformationen: " + errorAppendix, "OLEError", 0);
error.Dispose();
TypeScript:
import { cRM } from "./sdk/combitCRM.SDK.WindowsClient.v13";
const oleError = someObject.LastError; // DocMngr, EmailTool*, SQLShell
const errorCode = oleError.ErrorCode;
const errorAppendix = oleError.ErrorAppendix;
const errorText = oleError.ErrorText;
const nativeErrorCode = oleError.NativeErrorCode;
cRM.DialogMessageBox(
`Bitte beachten Sie folgende Informationen: \r\nFehlercode: ${errorCode} (Nativer Fehlercode: ${nativeErrorCode})\r\nFehlermeldung: ${errorText}\r\nZusätzliche Fehlerinformationen: ${errorAppendix}`,
"OLEError",
0
);