Beschreibung:
Die Konfigurationsdatei "global.ini" wird aus der Datenbanktabelle "cmbt_Files" in das Dateisystem geschrieben.
VBScript:
Dim sSourceFileName : sSourceFileName = "global.ini"
Dim sDestinationPath : sDestinationPath = "C:\" & sSourceFileName
Dim bSuccess : bSuccess = cRM.FetchGlobalConfigFile(sSourceFileName, sDestinationPath)
If (bSuccess = True) Then
Call cRM.DialogMessageBox("Die Datei """ & sSourceFileName & """ konnte erfolgreich abgelegt werden: " & vbCrlf & "" & sDestinationPath & "", "cRM.FetchGlobalConfigFile", vbOkOnly)
ElseIf (bSuccess = False) Then
Call cRM.DialogMessageBox("Die Datei """ & sSourceFileName & """ konnte nicht erfolgreich abgelegt werden.", "cRM.FetchGlobalConfigFile", vbOkOnly)
End If
C#-Script:
string sourceFileName = "global.ini";
string destinationPath = @"C:\" + sourceFileName;
bool success = cRM.FetchGlobalConfigFile(sourceFileName, destinationPath);
if (success == true)
{
cRM.DialogMessageBox("Die Datei \"" + sourceFileName + "\" konnte erfolgreich abgelegt werden: " + "\r\n" + "" + destinationPath + "", "cRM.FetchGlobalConfigFile", 0);
}
else if (success == false)
{
cRM.DialogMessageBox("Die Datei \"" + sourceFileName + "\" konnte nicht erfolgreich abgelegt werden.", "cRM.FetchGlobalConfigFile", 0);
}
TypeScript:
import { cRM } from "./sdk/combitCRM.SDK.WindowsClient.v13";
const sourceFileName : string = "global.ini";
const destinationPath : string = `C:\\${sourceFileName}`;
let bSuccess : boolean = cRM.FetchGlobalConfigFile(sourceFileName, destinationPath);
if (bSuccess = true){
cRM.DialogMessageBox(`Die Datei \"${sourceFileName}\" konnte erfolgreich abgelegt werden: \"${destinationPath}\"`, "cRM.FetchGlobalConfigFile", 0);
}
else if (bSuccess = false) {
cRM.DialogMessageBox(`Die Datei \"${sourceFileName}\" konnte nicht erfolgreich abgelegt werden.`, "cRM.FetchGlobalConfigFile", 0);
}