Static query creation in Dynamic AX
Hi, Static Query: 1.1.Create new query 1.2.Drop parent table in the data source; drop the range – field 1.3.Drop child table in the datasource of parent table; drop the range – field 1.4.Change Relations property to Yes in child table. 1.5.If you expand the Relations node you will find auto populated relation. Regards,
Dynamics AX Programming of Basic Methods of Tables
Definition and modification of methods in tables When a new table in the Tree of Objects of the Application is created, MorphXautomatically creates a series of methods for her. Adding X++ code to these methods we can modify the predetermined behavior of the system. In addition, we can define our own methods. The methods of system […]
Sequence of Form’s Methods in Dynamics AX
This gives the information of method calls in the form level while 1. Opening the Form. 2. Creating/Updating/Deleting the record in the Form. 3. Closing the Form. Sequence of Methods calls while opening the Form Form — init () Form — Datasource — init () Form — run () Form — Datasource — execute Query () Form — Datasource […]
Macros in Dynamics AX X++
A macro is a variable known to the precompiler. The variable can have a value that is a sequence of characters, but it is not required to have a value. The #define directive tells the precompiler to create the macro variable, including an optional value. The #if directive tests whether the variable is defined, and optionally, whether it […]
inserting into table by job in AX X++
static voidDataDic_InsertRecord(Args _args) { MyTable myTable; ; ttsbegin; myTable.initValue(); myTable.accountNum = “100”; myTable.custName = “Alt. customer id 100”; myTable.custCurrencyCode = “USD”; if (myTable.validateWrite()) myTable.insert(); ttscommit; }
X++ job using container
static voidIntro_For(Args _args) { Container names = [“Lay”, “Kai”, “Zbigniew”, “Rolf”, “Memed”]; Counter counter; ; for (counter=1; counter <= conlen(names); counter++) { info(strFmt(“%1: Name: %2”, counter, conpeek(names, counter))); } }
Infolog in AX and its types
Hi, Infolog static void Intro_Infolog(Args _args) { int i; ; info(“This is an info.”); warning(“This is a warning.”); error(“This is an error.”); setprefix(“prefix text”); for (i=1; i<=3; i++) { setprefix(“1. for loop”); info(“loop 1”); } for (i=1; i<=3; i++) { setprefix(“2. for loop”); info(“loop 2”); } //info(“Check customer parameters.”, “”, //SysInfoAction_Formrun::newFormname(formStr(CustParameters), //identifierStr(Customer_defaultCust), “”)); info(“Check the […]
X++ tutorials
Hi, please try below code and observe the execution. Conditional statement 2 table using while int counter = 1; while (counter <= 25) { print counter * 2; counter++; } pause; warning msg Box::warning(“This is a warning message.”, “Title text”, “Help text”); Info msg Box::info(“Main Text”, “Title”, “This is the help text”); YesNo msg Box::yesNo(“Choose Yes […]
SelectionChange() in Dynamic AX
Hi, Validating the radio button with reference to its selection over the stringEdit Field. On Changeing the option the adjacent stringedit will be enables and remaining will be disable as follows. public int selectionChange() { int ret; ret = super(); switch(OptionRbt.selection()) { case (1) : { DateEdit1.enabled(true); DateEdit.enabled(false); break; } case (2): { DateEdit1.enabled(false); DateEdit.enabled(true); […]