In X++ we often come across an issue that we are unable to access an object member (e.g. a form method) via this keyword. Instead we CAN access the same form method via element keyword. So what's the difference between them? The difference is of the scope. To understand how it works, let's assume that... Continue Reading →
AX 2012: Create lookup in X++
To create a lookup on a control (e.g. StringEdit control), override the lookup method of that control and copy paste the following code snippet in it. Of course, you will need to substitute datasource of the query according to your requirements. public void lookup() { Query query; QueryBuildDataSource datasourceModule; QueryBuildDataSource datasourceLanguage; QueryBuildRange rangeElementType; QueryBuildRange rangeModuleId;... Continue Reading →
AX 2012: Windows Save File Dialog in X++
If you want to open the standard Windows Save File Dialog from X++ and let the user select the path of the file to save to, then you can use the following code: This code opens the following dialog:
AX 2012: Display methods – Different datasources – Same control
AX developers always come across a requirement of showing data from different datasources on the same control though these datasources should be related to each other. The solution to this requirement is to define display methods on the table which you choose to be the control datasource. Display methods are very handy for showing data... Continue Reading →
AX 2012: Conditional Relations with Field Fixed and Related Field Fixed
Conditional relations are used to filter records in parent or related table. We can define conditional relations by specifying fields in a table relation as: Field Fixed OR Related Field Fixed Consider a scenario of a call center. The operator's responsibility is to receive calls and get the orders for a shoe store. The... Continue Reading →