How to override lookup

void SummaryProjectLookup(FormControl ctrl) { SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(ProjTable),ctrl); Query query = New Query(); QueryBuildDataSource queryBuildDataSource = query.addDataSource(tableNum(ProjTable)); QueryBuildRange queryBuildRange; ; sysTableLookup.addLookupfield(fieldNum(ProjTable, ProjId)); sysTableLookup.addLookupfield(fieldNum(ProjTable, Name)); sysTableLookup.addLookupfield(fieldNum(ProjTable, Status)); queryBuildRange = queryBuildDataSource.addRange(fieldNum(ProjTable, Type));

How to get current language

xInfo inf; ; inf = new xInfo(); if( inf ) { inf.language(); }

How to check if your variable suit the conditions given in query range

Use inRange methods from Global class static boolean inRange(str _rangeValue, anytype _value) Example: { str _rangeValue; str _value ; boolean result; ; _rangeValue = ‘200..500’; _value = ‘300’; result =

Add the node to a Project

void moveToProject(HWND AxChild) { ProjectNode nodeMenuItemProj; ; nodeMenuItemProj = CDT_Global::extractProjNode(AxChild); if (nodeMenuItemProj) { nodeMenuItemProj = nodeMenuItemProj.getRunNode(); nodeMenuItemProj.lockUpdate(); nodeMenuItemProj.addUtilNode(UtilElementType::Form, formName); nodeMenuItemProj.unlockUpdate(); nodeMenuItemProj.AOTcompile(1); nodeMenuItemProj.AOTcompile(1); nodeMenuItemProj.AOTSave(); } }

Get active window handle

static public HWND getActiveWhd() { HWND AxClient, AxChild; ; AxClient = WinApi::findWindowEx(infolog.hWnd(), 0, “MDIClient”, “”); AxChild = WinApi::findWindowEx(AxClient, nullvalue(AxChild), “”, “”); return AxChild; }

Select statement patterns

This article contains descriptions of select statement patterns that can be used in the Microsoft Dynamics AX (Axapta). The list of select statement patterns provided is as follows: Enable/Disable condition

InventOnHand vs InventDimOnHand

What the difference between InventOnHand and InventDimOnHand classes and in what cases they must be used? Axapta InventOnHand class is wrapper for InventSum table. Unique index for InventSum table is