top of page

Sage 100 AppDesigner/AppServer Code - clientseitig eingestelltes Geschäftsjahr / Fiscal year as set on the client side

(alle Versionen/all versions)

Donnerstag, 12. Mai 2022

Deutsch

Situation

Mögliche Workarounds


English

Situation

Possible Workarounds



Deutsch


Situation

Viele Sage 100 AddOns / Programmanpassungen benötigen ein Applikationsdatum\Jahr.

Dieses wird bei der Anmeldung (MS-Access-Frontend, Belegdatum, Belegjahr) vom Benutzer angegeben.

Innerhalb des klassischen MS-Access-Frontends steht dieses Belegjahr/Belegdatum überall zur Verfügung.

Ja, bei einigen Aufrufen im Applikationsserver (DataService, MacroProcessBase) kann man diese Informationen teils über das "Context"-Property ermitteln (Sage liefert das teils über die Basisklassen, mit "Context.ApplicationYear").

In den "DLL-Common-Methods" (DCMs), auch neueren wie "BelegProxy" etc., die ja auch serverseitig laufen, stehen diese Informationen nicht zur Verfügung.

Auch ein manuelles Abrufen des AppServer-Contextes, füllt leider nicht die beiden benötigten Properties.

Sagede.Shared.RealTimeData.Common.ApplicationContext ctx = Sagede.OfficeLine.Shared.RealTimeData.Client.SharedFunctions.GetApplicationInfo(mandant, mandant.ParameterBag);

Mögliche Workarounds

Wirklich gute Workarounds gibt es leider nicht!

Auf der "Sage Customer Voice" Webseite gibt es einige sinnvolle Verbesserungsvorschläge, die in diese Richtung gehen, z.B. Übertragung des User-Daten vom Client zum AppServer.


Sage wurde zu diesem Thema befragt und hat vorgeschlagen, dass zumindest das aktuell eingestellte Geschäftsjahr wie folgt ermittelt werden kann:

mandant.PeriodenManager.PeriodeAktuell.Jahr

⚠️Dieser Workaround funktioniert auch nicht zuverlässig!⚠️

D.h. es steht in älteren Sage Versionen nicht das im Client eingestellte Geschäftsjahr zuverlässig mit diesem Code bereit.


In neueren Sage Versionen (ab OL 9.0.5.x) steht der Platzhalter "GeschaeftsjahrClient" in Makros zur Verfügung, was leider in bestimmten .net Quellcode-Situationen wie DCMs ebenfalls nicht weiterhilft.

Sage hat hier eine große Lücke im .net-seitigen Quellcode-Ablauf, die dringend gelöst werden muss!



English


Situation

Many Sage 100 AddOns/program adjustments require an application date\year.

This is specified by the user when registering (MS-Access frontend, document date, document year).

This document year/document date is available everywhere within the classic MS-Access front end.

Unfortunately, it is not available in all .net implementations!

Yes, with some calls in the Sage application server (DataService, MacroProcessBase), this information can be determined partly via the "Context" property (Sage supplies this partly via the base classes, with "Context.ApplicationYear").

However, this information is not available in the "DLL Common Methods" (DCM`s), including newer ones such as "BelegProxy", etc., which also run on the server side.

Unfortunately, even manually retrieving the AppServer context does not fill the two required properties.

Sagede.Shared.RealTimeData.Common.ApplicationContext ctx = Sagede.OfficeLine.Shared.RealTimeData.Client.SharedFunctions.GetApplicationInfo(mandant, mandant.ParameterBag);

Possible Workarounds

Unfortunately, there are no really good workarounds!

On the "Sage Customer Voice" website, there are some useful suggestions for improvement that go in this direction, e.g. Übertragung des User-Daten vom Client zum AppServer.


Sage was consulted on this issue and has suggested that at least the current adjusted fiscal year can be determined as follows:

mandant.PeriodenManager.PeriodeAktuell.Jahr

⚠️This workaround does also not work reliably!⚠️

This means that in older versions of Sage the application year set in the client is not reliably available with this code.


In newer Sage versions (from OL 9.0.5.x) the placeholder “GeschaeftsjahrClient” is available in macros which unfortunately does not help in certain .net source code situations like DCM´s.


Sage has a big gap in the .net side source code flow that urgently needs to be solved!


bottom of page