Upgrade auf 23.2.0
Unbedingt die aktuellen Installationsvoraussetzungen vorab prüfen!
Diese Anleitung berücksichtigt immer nur den Sprung von der vorhergehenden Version zu der gerade beschriebenen Version. Bei Upgrades über mehrere Versionen hinweg müssen alle Änderungen der Zwischenversionen ebenfalls beachtet werden! Siehe genereller Ablauf von Upgrades.
Was wurde gemacht?
Zusammenfassung
- INV-549
- Verhalten bei Ablehnung von Mappen verbessern: "Ablehnungsgrund" mit Historien-Feld in der Dokumentenansicht
- ACHTUNG: siehe Unterpunkt "Manuell auszuführende Schritte"
- Auflösung Cust-Skripte INV-564
- Alle
cust-Skripte in Invoice wurden inspc-Skripte umgewandelt oder anderweitig aufgelöst; das betrifft alle Skripte der Kategorienglobalcust,mail,ptpCFGcust,ptpINVcust,ptpRECcust,ptpVENcust - Diese umfassenden Änderungen erfordern sehr viele manuell auszuführende Schritte (siehe unten)
- Alle
- Am Mappentyp
ptpInvoicewurde das FeldhasEInvoiceDocumententfernt
Manuell auszuführende Schritte
Diese Anleitung berücksichtig immer nur den Sprung von der vorhergehenden Version zu der gerade beschrieben Version. Bei Upgrades über mehrere Versionen hinweg müssen alle Änderungen der Zwischenversionen ebenfalls beachtet werden!
Mappentypen
- An den Mappen des Mappentyps
ptpInvoicemuss überprüft werden, ob das Löschen des FeldeshasEInvoiceDocumentdurch das Update-Skript erfolgreich war. Sofern das Feld noch an Mappen existiert, muss am Mappentyp einmal die Aktion 'Mappen ändern' ausgeführt werden. Ist das Feld danach immer noch da, muss am Mappentyp temporär eine Änderung vorgenommen werden (z. B. Leerzeichen im Namensfeld eintragen), diese wieder rückgängig gemacht und danach einmal auf 'Übernehmen' und anschließend auf 'Mappen ändern' geklickt werden. Das Feld sollte nun verschwunden sein.
Scripting
Es wird empfohlen, diesen ersten Schritt mit einem Entwickler gemeinsam durchzugehen
Da nun alle cust-Skripte durch spc-Skripte ersetzt wurden, ist es notwendig, alle cust-Skripte, die direkt ausführbaren Code und KEIN customizing enthalten, zu löschen. (Siehe unten für die Liste aller Skripte, die direkt ausführbaren Code enthalten) Was gilt als Skript, das direkt ausführbaren Code enthält?
Skript mit direkt ausführbarem Code, d.h. das Skript selbst gibt einen Wert zurück:
function doSomething() {
const docFile = context.file;
...
return -1;
}
context.returnValue = doSomething();
Skript ohne direkt ausführbaren Code, d.h. das Skript stellt nur Funktionen für andere Skripte zur Verfügung:
function someFunctionToExport(docFile) {
...
return -1;
}
exports.someFunctionToExport = someFunctionToExport;
cust-Skripte hingegen, die direkt ausführbaren Code UND customizing enthalten, d.h. sich vom gleichnamigen cust-Skript, das mit dem Standard zur jeweiligen Version ausgeliefert wurde, unterscheiden, müssen ein wenig modifiziert werden, sodass ihre Logik weiterhin die Standard-Logik überschreibt. Nämlich muss der Code in eine Funktion executeDirectly gepackt (die Funktion muss exakt so heißen!) und diese Funktion dann exportiert werden.
Vorher:
const libA = require("ou.sp.libA");
const libB = require("ou.sp.libB");
const docFile = context.file;
if (docFile.globalState === 100) {
context.returnValue = 1;
} else {
context.returnValue = -1;
}
Nachher:
const libA = require("ou.sp.libA");
const libB = require("ou.sp.libB");
function executeDirectly() {
const docFile = context.file;
if (docFile.globalState === 100) {
return 1;
} else {
return -1;
}
}
exports.executeDirectly = executeDirectly;
Für die Entscheidung, ob ein cust-Skript Code enthält, der vom ursprünglichen und gleichnamigen cust-Skript abweicht, kann ein Entwickler die Skripte zur Verfügung stellen, die mit der Invoice-Version, die aktuell beim Kunden installiert ist, ausgeliefert wurden.
Hier ist die Liste mit allen cust-Skripten aus dem Standard, die direkt ausführbaren Code enthalten und zu spc-Skripten umgewandelt wurden:
ou.cust.MAIL.filetype.action.help.tsou.cust.MAIL.filetype.field.assignedRegister.tsou.cust.MAIL.filetype.field.fileType.tsou.cust.MAIL.filetype.action.copy.tsou.cust.MAIL.filetype.action.onSave.tsou.cust.MAIL.filetype.action.delete.tsou.cust.MAIL.filetype.action.onDelete.tsou.cust.MAIL.filetype.assignedRegister.tsGadget_ou.cust.cfgBT.filetype.field.multiTable.tsou.cust.ptpVendorSettings.filetype.action.onSave.tsou.cust.cfgBT.filetype.action.delete.tsGadget_ou.cust.ptpVendorSettings.filetype.field.html.summary.tsou.cust.ptpVendorSettings.folder.action.storeGlobalSettings.tsou.cust.ptpVendorSettings.filetype.action.onDelete.tsou.cust.cfgBT.filetype.action.onsave.tsou.cust.ptpVendorSettings.filetype.Property.dFROnFileViewScript.tsou.cust.ptpVendorSettings.filetype.field.recipient.tsou.cust.ptpVendorSettings.callback.functions.vendorSearch.tsou.cust.cfgBT.filetype.action.oncreate.tsou.cust.cfgVC.filetype.action.onDelete.tsou.cust.cfgCC.filetype.field.costCenter.tsou.cust.cfgRL.filetype.field.releaseRole.tsou.cust.cfgVC.callback.functions.getVatCode.tsou.cust.cfgVC.filetype.action.onSave.tsou.cust.cfgVC.callback.functions.lookupVatCode.tsou.cust.cfgCC.filetype.action.field.costCenter.tsou.cust.cfgRL.filetype.field.responsibleUser.tsou.cust.cfgCC.job.cfgCostCenter.tsou.cust.cfgRL.filetype.action.onSave.tsou.cust.cfgCC.filetype.action.onSave.tsou.cust.cfgCC.filetype.action.addCostCenter.tsGadget_ou.cust.filetype.folder.html.Counter.tsou.cust.global.filetype.field.attachments.tsou.cust.global.filetype.field.recipient.tsGadget_ou.cust.global.filetype.register.timeline.sentMails.tsou.cust.global.filetype.action.sendMail.tsou.cust.global.filetype.field.subject.tsou.cust.global.filetype.field.sender.tsou.cust.global.filetype.field.body.tsou.cust.global.filetype.action.takeTask.tsou.cust.global.filetype.field.signatur.tsou.cust.global.loadMailTemplate.tsou.cust.global.filetype.unsetMailIndicator.tsou.cust.global.filetype.field.recipientCopy.tsou.cust.global.job.removeCache.tsou.cust.global.filetype.action.getMailTemplate.tsou.cust.ptpINV.filetype.action.loadBookingTemplate.tsou.cust.ptpINV.workflow.action.outgoingEvent.tsou.cust.ptpINV.workflow.decision.checkAfterVerify.tsou.cust.ptpINV.callback.functions.ROB.lookupCostUnit.tsou.cust.ptpINV.workflow.guard.index.tsou.cust.ptpINV.callback.functions.ROB.getDefaultVatCode.tsou.cust.ptpINV.workflow.sendsignal.createReleaseList.tsou.cust.ptpINV.filetype.action.onDelete.tsou.cust.ptpINV.workflow.action.incomingEvent.tsou.cust.ptpINV.filetype.action.newBT.tsou.cust.ptpINV.workflow.decision.autoIndex.tsou.cust.ptpINV.callback.functions.ROB.getVatCodeByVatRate.tsou.cust.ptpINV.callback.functions.RMB.getItemOrderNumber.tsou.cust.ptpINV.callbacks.tsou.cust.ptpINV.workflow.access.booking.tsou.cust.ptpINV.filetype.field.paymentTermSource.tsou.cust.ptpINV.callback.functions.getVendor.tsou.cust.ptpINV.callback.functions.cover.historyVerification.tsou.cust.ptpINV.callback.bookingTemplate.tsou.cust.ptpINV.workflow.decision.checkAfterExport.tsou.cust.ptpINV.filetype.action.writeBookingTemplate.tsou.cust.ptpINV.callback.functions.ROB.lookupImpersonalAccount.tsou.cust.ptpINV.workflow.guard.manualExport.tsou.cust.ptpINV.workflow.sendsignal.export.tsou.cust.ptpINV.filetype.action.manStartWF.tsou.cust.ptpINV.enumval.ptpInvoiceUser.tsou.cust.ptpINV.callback.functions.lookupVendor.tsou.cust.ptpINV.callback.dashboard.fetchValuta.tsou.cust.ptpINV.workflow.guard.rejected.tsou.cust.ptpINV.workflow.guard.backToIndex.tsou.cust.ptpINV.callback.functions.ROB.lookupVatCode.tsou.cust.ptpINV.callback.functions.ROB.getCostUnit.tsou.cust.ptpINV.callback.functions.cover.historyPositions.tsou.cust.ptpINV.filetype.property.dFROnFileViewScript.tsou.cust.ptpINV.job.delete.tsou.cust.ptpINV.workflow.guard.released.tsou.cust.ptpINV.workflow.decision.checkAfterRelease.tsou.cust.ptpINV.callback.functions.lookupVendorAccount.tsou.cust.ptpINV.job.deleteFromExtract.tsou.cust.ptpINV.workflow.guard.export.tsou.cust.ptpINV.install.adminDashboard.tsou.cust.ptpINV.callback.functions.ROB.getCostCenter.tsou.cust.ptpINV.filetype.action.approvedButtons.tsou.cust.ptpINV.workflow.guard.additionalVerification.tsou.cust.ptpINV.workflow.guard.backToVerification.tsou.cust.ptpINV.workflow.guard.verified.tsou.cust.ptpINV.workflow.decision.checkAfterExportResult.tsou.cust.ptpINV.filetype.property.hROnFileViewScript.tsou.cust.ptpINV.callback.functions.cover.history.tsou.cust.ptpINV.callback.functions.ROB.lookupCostCenter.tsou.cust.ptpINV.workflow.receivesignal.exportResult.tsou.cust.ptpINV.callback.functions.ROB.getVatCode.tsou.cust.ptpINV.callback.dashboard.fetchTask.tsou.cust.ptpINV.workflow.decision.RMB.tsou.cust.ptpINV.callback.functions.ROB.getImpersonalAccount.tsou.cust.ptpINV.job.archiv.tsou.cust.ptpINV.callback.functions.getPaymentTerm.tsou.cust.ptpINV.filetype.action.onSave.tsou.cust.ptpINV.filtetype.register.filter.duplicates.tsou.cust.ptpINV.job.dashboard.tsou.cust.ptpINV.callback.functions.ROB.lookupVatCodeByVatRate.tsou.cust.ptpINV.workflow.decision.autoExport.tsou.cust.ptpINV.callback.functions.getVendorAccount.tsou.cust.ptpINV.callback.functions.lookupPaymentTerm.tsou.cust.ptpINV.callback.functions.RMB.lookupItemOrderNumber.ts
Statt ou.sp.ptpINV.settings und ou.cust.ptpINV.settings gibt es jetzt das Skript ou.spc.ptpINV.settings. Dieses Skript exportiert auch kein Settings-Objekt mehr, sondern eine Funktion getSettings. D.h. jedes Skript, das die Settings importiert, muss dementsprechend angepasst werden.
Vorher:
var settings = require("ou.sp.ptpINV.settings");
var db = settings.ptpConnections.getDatabaseConnection("ousp");
Nachher:
var settings = require("ou.spc.ptpINV.settings");
var ptpConnections = settings.getSettings().ptpConnections;
var db = ptpConnections.getDatabaseConnection("ousp");
Um das bisherige customizing der Settings in ou.cust.ptpINV.settings zu erhalten, muss der Inhalt des cust-Skripts mit dem des neuen Skripts (ou.spc.ptpINV.settings) ersetzt werden, und jegliches customizing, das im cust-Skript vorhanden war, manuell wieder eingefügt werden.
Die Funktionalitäten, die bisher in ou.sp.ptpINV.callbacks zu finden waren, wurden in ou.sp.ptpINV.lib.callbacks verschoben. Jegliche Importe von require("ou.sp.ptpINV.callbacks") müssen dementsprechend angepasst werden.
Zudem wurde das Skript ou.cust.ptpINV.callbacks umbenannt in ou.spc.ptpINV.callbacks. D.h. speziell die Aufrufe var callback = loadCallbackScript("ou.cust.ptpINV.callbacks"); müssen angepasst werden zu var callback = loadCallbackScript("ou.spc.ptpINV.callbacks");. Um das bisherige customizing aus ou.cust.ptpINV.callbacks zu erhalten, muss der Inhalt des cust-Skripts mit dem des neuen Skripts (ou.spc.ptpINV.callbacks) ersetzt werden, und jegliches customizing, das im cust-Skript vorhanden war, manuell wieder eingefügt werden.
Das Skript ou.cust.ptpINV.lib.database.mapping wurde gelöscht. Customizing des Mappings (falls vorhanden) muss nun in das Callback in ou.tmpl.ptpINV.callbacks.database.mapping verschoben werden.
Das Skript ou.cust.MAIL.filetype.userexit.assignedRegister wurde umbenannt in ou.spc.MAIL.filetype.callback.assignedRegister, d.h. eventuell vorhandenes Customizing muss in ou.cust.MAIL.filetype.callback.assignedRegister verschoben werden
Workflow
Da alle cust-Skripte nun spc-Skripte sind, müssen diese neuen Skriptnamen auch im Workflow hinterlegt werden:
| Name | technical name | attribute name | new value |
|---|---|---|---|
| pf:workflow.ptpInvoice.action.rejected | ControlFlow_6 | Guard | runscript:ou.spc.ptpINV.workflow.guard.rejected |
| pf:workflow.ptpInvoice.action.verified | ControlFlow_16 | Guard | runscript:ou.spc.ptpINV.workflow.guard.verified |
| pf:workflow.ptpInvoice.action.released | ControlFlow_66 | Guard | runscript:ou.spc.ptpINV.workflow.guard.released |
| Dunkelbuchung | ControlFlow_103 | Guard | runscript:ou.spc.ptpINV.workflow.decision.autoExport |
| pf:workflow.ptpInvoice.action.index | ControlFlow_139 | Guard | runscript:ou.spc.ptpINV.workflow.guard.index |
| pf:workflow.ptpInvoice.action.rejected | ControlFlow_152 | Guard | runscript:ou.spc.ptpINV.workflow.guard.rejected |
| Auto-Indexierung | ControlFlow_158 | Guard | runscript:ou.spc.ptpINV.workflow.decision.autoIndex |
| pf:workflow.ptpInvoice.action.export | ControlFlow_161 | Guard | runscript:ou.spc.ptpINV.workflow.guard.export |
| Buchung Zielsystem ok? | ControlFlow_180 | Guard | runscript:ou.spc.ptpINV.workflow.decision.checkAfterExportResult |
| Buchung Export ok? | ControlFlow_191 | Guard | runscript:ou.spc.ptpINV.workflow.decision.checkAfterExport |
| pf:workflow.ptpInvoice.action.manualExport | ControlFlow_197 | Guard | runscript:ou.spc.ptpINV.workflow.guard.manualExport |
| pf:workflow.ptpInvoice.action.export | ControlFlow_198 | Guard | runscript:ou.spc.ptpINV.workflow.guard.export |
| pf:workflow.ptpInvoice.action.export -> VisibilityGuard | - | Value | runscript:ou.spc.ptpINV.workflow.access.booking |
| pf:workflow.ptpInvoice.action.manualExport | ControlFlow_199 | Guard | runscript:ou.spc.ptpINV.workflow.guard.manualExport |
| Betragsfreigabe erfüllt? | ControlFlow_233 | Guard | runscript:ou.spc.ptpINV.workflow.decision.checkAfterRelease |
| Zweitfreigeber? | ControlFlow_260 | Guard | runscript:ou.spc.ptpINV.workflow.decision.checkAfterVerify |
| pf:workflow.ptpInvoice.action.rejected | ControlFlow_277 | Guard | runscript:ou.spc.ptpINV.workflow.guard.rejected |
| pf:workflow.ptpInvoice.action.backToVerification | ControlFlow_278 | Guard | runscript:ou.spc.ptpINV.workflow.guard.backToVerification |
| RMB | ControlFlow_282 | Guard | runscript:ou.spc.ptpINV.workflow.decision.RMB |
| pf:workflow.ptpInvoice.action.export | ControlFlow_284 | Guard | runscript:ou.spc.ptpINV.workflow.guard.export |
| pf:workflow.ptpInvoice.action.rejected | ControlFlow_288 | Guard | runscript:ou.spc.ptpINV.workflow.guard.rejected |
| pf:workflow.ptpInvoice.action.backToIndex | ControlFlow_295 | Guard | runscript:ou.spc.ptpINV.workflow.guard.backToIndex |
| pf:workflow.ptpInvoice.action.backToIndex | ControlFlow_296 | Guard | runscript:ou.spc.ptpINV.workflow.guard.backToIndex |
| pf:workflow.ptpInvoice.action.rejected | ControlFlow_297 | Guard | runscript:ou.spc.ptpINV.workflow.guard.rejected |
| pf:workflow.ptpInvoice.action.additionalVerification | ControlFlow_300 | Guard | runscript:ou.spc.ptpINV.workflow.guard.additionalVerification |
| fachliche Prüfung -> Feldbelegung -> Bei Eingang | Action_3 | runscript | ou.spc.ptpINV.workflow.action.incomingEvent |
| fachliche Prüfung -> Feldbelegung -> Bei Ausgang | Action_3 | runscript | ou.spc.ptpINV.workflow.action.outgoingEvent |
| Daten prüfen -> Feldbelegung -> Bei Eingang | Action_10 | runscript | ou.spc.ptpINV.workflow.action.incomingEvent |
| Daten prüfen -> Feldbelegung -> Bei Ausgang | Action_10 | runscript | ou.spc.ptpINV.workflow.action.outgoingEvent |
| WorkflowDefaultScript -> Feldbelegung -> Bei Eingang | SendSignal_18 | runscript | ou.spc.ptpINV.workflow.action.incomingEvent |
| WorkflowDefaultScript -> Feldbelegung -> Bei Ausgang | SendSignal_18 | runscript | ou.spc.ptpINV.workflow.action.outgoingEvent |
| Prüfen und Buchen -> Feldbelegung -> Bei Eingang | Action_22 | runscript | ou.spc.ptpINV.workflow.action.incomingEvent |
| Prüfen und Buchen -> Feldbelegung -> Bei Ausgang | Action_22 | runscript | ou.spc.ptpINV.workflow.action.outgoingEvent |
| Daten prüfen -> Feldbelegung -> Bei Eingang | Action_27 | runscript | ou.spc.ptpINV.workflow.action.incomingEvent |
| Daten prüfen -> Feldbelegung -> Bei Ausgang | Action_27 | runscript | ou.spc.ptpINV.workflow.action.outgoingEvent |
| Ende -> Feldbelegung -> Bei Eingang | FinalState_43 | runscript | ou.spc.ptpINV.workflow.action.incomingEvent |
| pf:workflow.ptpInvoice.receivesignal.checkXtractState -> Feldbelegung -> Bei Eingang | ReceiveSignal_109 | runscript | ou.spc.ptpINV.workflow.action.incomingEvent |
| pf:workflow.ptpInvoice.receivesignal.checkXtractState -> Feldbelegung -> Bei Ausgang | ReceiveSignal_109 | runscript | ou.spc.ptpINV.workflow.action.outgoingEvent |
| Starte Workflow -> Feldbelegung -> Bei Eingang | SendSignal_107 | runscript | ou.spc.ptpINV.workflow.action.incomingEvent |
| Starte Workflow -> Feldbelegung -> Bei Ausgang | SendSignal_107 | runscript | ou.spc.ptpINV.workflow.action.outgoingEvent |
| Ende -> Feldbelegung -> Bei Eingang | FinalState_114 | runscript | ou.spc.ptpINV.workflow.action.incomingEvent |
| Indexierung -> Feldbelegung -> Bei Eingang | Action_138 | runscript | ou.spc.ptpINV.workflow.action.incomingEvent |
| Indexierung -> Feldbelegung -> Bei Ausgang | Action_138 | runscript | ou.spc.ptpINV.workflow.action.outgoingEvent |
| Betragsfreigabe -> Feldbelegung -> Bei Eingang | Action_151 | runscript | ou.spc.ptpINV.workflow.action.incomingEvent |
| Betragsfreigabe -> Feldbelegung -> Bei Ausgang | Action_151 | runscript | ou.spc.ptpINV.workflow.action.outgoingEvent |
| Prüfen (Buchung) -> Feldbelegung -> Bei Eingang | Action_182 | runscript | ou.spc.ptpINV.workflow.action.incomingEvent |
| Prüfen (Buchung) -> Feldbelegung -> Bei Ausgang | Action_182 | runscript | ou.spc.ptpINV.workflow.action.outgoingEvent |
| Buchung im Zielsystem erfolgreich angekommen? | ReceiveSignal_183 | Guard | runscript:ou.spc.ptpINV.workflow.receivesignal.exportResult |
| Buchung im Zielsystem erfolgreich angekommen? -> Feldbelegung -> Bei Eingang | ReceiveSignal_183 | Guard | ou.spc.ptpINV.workflow.action.incomingEvent |
| Buchung im Zielsystem erfolgreich angekommen? -> Feldbelegung -> Bei Ausgang | ReceiveSignal_183 | Guard | ou.spc.ptpINV.workflow.action.outgoingEvent |
| Ende -> Feldbelegung -> Bei Eingang | FinalState_216 | runscript | ou.spc.ptpINV.workflow.action.incomingEvent |
| Ende -> Feldbelegung -> Bei Eingang | FinalState_244 | runscript | ou.spc.ptpINV.workflow.action.incomingEvent |
| Ende -> Feldbelegung -> Bei Eingang | FinalState_269 | runscript | ou.spc.ptpINV.workflow.action.incomingEvent |
| ou.cust.ptpINV.workflow.sendsignal.export | SendSignal_272 | Recipient | ou.spc.ptpINV.workflow.sendsignal.export |
| ou.cust.ptpINV.workflow.sendsignal.export -> Feldbelegung -> Bei Eingang | SendSignal_272 | runscript | ou.spc.ptpINV.workflow.action.incomingEvent |
| ou.cust.ptpINV.workflow.sendsignal.export -> Feldbelegung -> Bei Ausgang | SendSignal_272 | runscript | ou.spc.ptpINV.workflow.action.outgoingEvent |
| Prüfen und Buchen -> Feldbelegung -> Bei Eingang | Action_280 | runscript | ou.spc.ptpINV.workflow.action.incomingEvent |
| Prüfen und Buchen -> Feldbelegung -> Bei Ausgang | Action_280 | runscript | ou.spc.ptpINV.workflow.action.outgoingEvent |
| Ende -> Feldbelegung -> Bei Eingang | FinalState_287 | runscript | ou.spc.ptpINV.workflow.action.incomingEvent |
Mappen anpassen
Documentsmanager
Öffne Documentsmanager > Mappentypen > ptpInvoice:
In den Felder sollte bereits reasonReject vorhanden sein - dann tippe auf den Button "Mappen ändern" (und im zusätzlichen Fenster auf "ok")