No items found.

Create standard class methods for AX 2012

So let get started, first create new class in AOT and rename it:

Then double click on the class to open the code editor and click on button ‘New’ to create new method:

Now select all in the newly create method (use ‘Ctrl+A’ key combination) and type construct, then hit the ‘Tab’ key and the magic happens, the construct method was created:

Now we’ll create a main method the same way, just create new method, select all and type ‘main’:

Press ‘Tab’ and the main method gets created:

The only thing you need to add now is creating instance out of class and running some method from the instance. For creating the instance we can use the construct method created before also in automatic way:

So now comes the best part, creating parm methods automatically. Create new method, select all and type ‘parm’, then press tab. A new form will pop-up to declare variable  and type for the parm method:

Just have in mind that you should declare the variable in the class declaration as well:

And that's it, you can create basic methods that you need in most of the classes in matter of seconds.

Happy DAXing.

Zobacz inne

Dynamics 365 F&O

200 tysięcy, 400 tysięcy, milion euro. Ile naprawdę kosztuje przechowywanie historii w D365 F&O.

Czytaj artykuł
Text Link
Power BI

Szkolenie Power BI: zakres, poziomy i certyfikacja PL-300

Czytaj artykuł
Text Link
Power BI

Direct Lake vs Import w Power BI. Który tryb wybrać dla dużych modeli danych

Czytaj artykuł
Text Link
Wróć do wszystkich

Szukasz partnera Microsoft? Porozmawiajmy o Twoim projekcie

Pracuj z zespołem, który zrealizował wdrożenia i projekty dla dziesiątek firm. Umów rozmowę wstępną i sprawdź:

Jak Dynamics 365 dopasować do procesów Twojej firmy, a nie odwrotnie

Które obszary warto zautomatyzować, żeby odzyskać czas i obniżyć koszty

Jak wygląda wdrożenie z Anegis krok po kroku: od analizy po wsparcie po starcie

Wybierz termin spotkania
Dziękujemy za wiadomość!
Oops! Something went wrong while submitting the form.
Microsoft AI Builder
Microsoft Copilot Studio
No items found.
No items found.
No items found.