How to use "LIKE" operator in QueryBuildRange

To make something as the LIKE operator in a query, just assign a value to the QueryRange including a wildcard. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 static void QueryBuildRange_Sample(Args _args) { Query query = new Query(); QueryRun queryRun; QueryBuildDataSource qbds; QueryBuildRange queryRange; CustTable custTable; qbds.addDataSource(tableNum(CustTable)); queryRange = qbds.addRange(fieldNum(CustTable, AccountNum)); queryRange.value("axd*"); queryRun = new QueryRun(query); while(queryRun.

Set default value for a comboBox in Dynamics AX 2012 with X++

Beside modify metadata on form properties, as best practice we can use code like below to assign default value for combobox. You can use this code in the form’s init method after super(): 1 ComboBoxName.selection(ComboBoxName::DefaultValue); If this is a table field we should you best practice overriding the initValue method in the table: 1 this.ComboBoxName = ComboBoxName::DefaultValue; Override initValue in the form’s datasource only if it should be a specific behaviour in this form only.

Rename a Database in SQL Server

Open Microsoft SQL Server Management Studio. Connect to the server where in the DB you want to rename is located. Modify the following script and run it 1 2 3 4 5 6 7 8 9 10 11 -- Replace all MyDBs with the name of the DB you want to change its name USE [MyDB]; -- Changing Physical names and paths -- Replace all NewMyDB with the new name you want to set for the DB -- Replace 'C:.

Web Services on IIS - Exception has been thrown by the target of an invocation

When I try to install Web Services on IIS for Retails POS Component, and I got the problem. This scenario shouldn’t be common in a production environment, but, it is indeed quite common in a VM machine (I’m using virtual machine Hyper-V on Windows 8.1) exception_1 Error: exception_2 Exception has been thrown by the target of an invocation exception_3 So, the problem is relate to thee AOS Service account, which by default is usually NT AUTHORITYNETWORK SERVICE account.

Modify Microsoft Dynamics AX 2012 R3 SSRS configurations using PowerShell

reportManagerWebConfig.ps1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 #Modify the Report Server Web.config file. ie replace MSRS11.VAS with your folder name Set-ExecutionPolicy Unrestricted $webConfig = "C:Program FilesMicrosoft SQL ServerMSRS11.VASReporting ServicesReportManagerWeb.config" $currentDate = (get-date).tostring("mm_dd_yyyy-hh_mm_s") # month_day_year - hours_mins_seconds $backup = $webConfig + "_$currentDate" $doc = new-object System.Xml.XmlDocument $doc.Load($webConfig) #save a backup copy $doc.Save($backup) Write-Host "Backup saved as " + $backup $node = $doc.

AxBuild.exe for Parallel Compile on AOS

If you have only 10 mins to build AX, try this In AOS server, go to C:\Program Files\Microsoft Dynamics AX\60\Server\DAX\bin and open cmd from here then run this command 1 axbuild.exe xppcompileall /s=01 /altbin="C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin" /s is your AOS number instance, you can check it in windows services /altbin the path to AX client axbuild Here is the result axbuild Once compile complete, you can import compile log file at C:\Program Files\Microsoft Dynamics AX\60\Server\DAX\log into compiler output of AX client axbuild Reference MSDN: https://msdn.

List Page Interaction Class

Form interaction classes that allow user interface control logic to be shared across forms. For instance, controlling which buttons are available to a list page and the associated detail form.

The interaction classes are extending a base ListPageInteraction class. This has some methods supported by the kernel to interact e.g. with initializations of the list page form. Other classes can be build stand alone to execute e.g. a batch process or represent a web service or posting classes.

Form interaction classes are not mandatory for list pages but should be used on data entry forms that require logic. This ensures consistency and allows easier maintenance of logic.

This class inherits from SysListPageInteractionBase, here is some methods we need to know

  • initializing: Called when the form is initializing – Similar to the form init method

  • intializeQuery: Also called when the form is initializing – Similar to the datasource init method.

  • selectionChanged: Called when the active record changes – Similar to the datasource active method.

  • setButtonEnabled: Should be overridden to dynamically enable/disable buttons based on the current selection. This is called from the selectionChanged method.