Ereignisse
Power BI DataViz Weltmeisterschaften
14. Feb., 16 Uhr - 31. März, 16 Uhr
Mit 4 Chancen, ein Konferenzpaket zu gewinnen und es zum LIVE Grand Finale in Las Vegas zu machen
Weitere InformationenDieser Browser wird nicht mehr unterstützt.
Führen Sie ein Upgrade auf Microsoft Edge durch, um die neuesten Features, Sicherheitsupdates und den technischen Support zu nutzen.
X++ classes that implement the SysSetup
interface are processed as part of database synchronization. Custom X++ classes that implement SysSetup
are also run as part of database synchronization.
Attributes provide a powerful way to associate metadata, or declarative information, with code such as assemblies, types, methods, and properties. After an attribute is associated with a program entity, it can be queried at runtime by using reflection.
This article describes how to use the new SysSetupConfigAttribute
attribute that the platform updates for version 10.0.23 of finance and operations apps introduce for X++ classes that implement the SysSetup
interface.
The SysSetupConfigAttribute
attribute must be added for all X++ classes that implement the SysSetup
interface. It accepts two parameters:
ContinueOnError – This parameter is of the bool
type. If execution of the X++ class fails during synchronization, database synchronization will either fail or continue with the next steps, depending on the value of this parameter (true
or false
).
Timeout – This parameter is of the int
type, and the range of values is from 1 to 600 seconds. It defines the time range that the database synchronization operation will run the SysSetup
class during.
In the following code example, the ContinueOnError
parameter is set to true
, and the Timeout
parameter is set to 300
.
[SysSetupConfigAttribute(true, 300)]
class DemoClass implements SysSetup
{
// Class code here.
}
Hinweis
If the X++ class does not have the SysSetupConfigAttribute attribute, then default values are applied. ContinueOnError
is true and Timeout
is 120 seconds.
To execute the SysSetup scripts in asynchronous mode, the scripts need to be run as a batch job. This enhances performance and removes unnecessary dependencies by ensuring the scripts run parallel and independent of one another. To achieve this, use the SysSetupWrapper and the SysSetupAsync class that you can extend and consume. This allows DbSync to execute, as needed.
When enabling asynchronous mode, consider the following:
class DemoClass extends SysSetupAsync implements SysSetup
{
// Class code here.
}
SysSetup classes can be versioned and run only once, not on every DBSync execution. For example, whenever there is a change in the version, DBSync runs the X++ class.
As of version 10.0.27, the versioning feature is available for SysSetup classes.
A new _version
parameter of the Version type is added to the SysSetupConfigAttribute
attribute. It accepts values in the format [Major].[Minor], such as 1.0, 2.1, 4.5, and 10.4.
DBSync reads the value of the _version
parameter, and whenever there is a change in the version, the scripts are run. This parameter is optional. The default value is 1.0. Therefore, if the X++ classes that are onboarded to SysSetup don't have the _version
parameter, the X++ class will have a default version value of 1.0 when it runs.
Hinweis
A versioned class (default) will successfully run only once, unless the version number is updated again. For example, a script that has a version value of 1.0 won't be rerun on every DBSync request.
The version value 0.0 is dedicated to the execution of X++ classes on every DBSync execution. Therefore, to run X++ classes on every DBSync operation, you must set the _version
parameter for the SysSetupConfigAttribute
attribute to 0.0.
SysSetup classes should start to use the _version
parameter in the SysSetupConfigAttribute
attribute. Otherwise, the default behavior is used when the X++ class runs. In other words, the version value is 1.0, and the class runs only once per version.
Ereignisse
Power BI DataViz Weltmeisterschaften
14. Feb., 16 Uhr - 31. März, 16 Uhr
Mit 4 Chancen, ein Konferenzpaket zu gewinnen und es zum LIVE Grand Finale in Las Vegas zu machen
Weitere InformationenTraining
Modul
Eine „Unterstützte Einrichtung“ in Dynamics 365 Business Central erstellen - Training
Die „Unterstützte Einrichtung“ leitet Sie bei der Konfiguration von Business Central an. Möchten Sie erfahren, wie Sie die Funktion „Unterstützte Einrichtung“ integrieren und eigene Assistentenseiten erstellen können? Dieses Modul erklärt diesen Vorgang.
Zertifizierung
Microsoft Certified: Dynamics 365: Finance and Operations Apps Developer Associate - Certifications
Sie implementieren und erweitern Finanz- und Betriebs-Apps in Microsoft Dynamics 365.
Dokumentation
Erstellen eines Stapelverarbeitungsauftrags - Finance & Operations | Dynamics 365
Erfahren Sie, wie Sie Batchaufträge erstellen. Dabei handelt es sich um Aufgabengruppen, die zur automatischen Verarbeitung an eine Application Object Server (AOS)-Instanz übermittelt werden.
Steckengebliebene Batchaufträge zurücksetzen - Human Resources | Dynamics 365
In diesem Artikel wird erläutert, wie Sie Probleme mit steckengebliebenen Batchaufträgen beheben können.