Form Controls in AX

Form controls belong to one of three groups, depending on their data source as follows: ·         Bound control – associated with a field in an underlying table. Use bound controls to display, enter, and update values from fields in the database. ·         Unbound control – does not have a data source. Use unbound controls to display pictures […]

Map in AX

Hi, Create a class and 4 methods as follows depicts example of map in AX public class CreateCountryCountMap { Map countryMap; } private void searchCustomers() { CustTable custTable; Counter cnt; LogisticsAddressCountryRegionId countryId; LogisticsAddressCountryRegionName countryName; countryMap = new Map(Types::String, Types::Integer); while select custTable { countryId = custTable.postalAddress().CountryRegionId; countryName = LogisticsAddressCountryRegion::find(countryId).displayName( ); cnt = 0; if (countryMap.exists(countryName)) […]

ForceLiterals & ForcePlaceholders in AX

Hi,   When you use forceliterals keywords in Axapta, Axapta will issue SQL statements directly to the database as text string. SELECT forceLiterals * FROM purchTable WHERE purchId == ‘EN00009’ ; In SQL server, it will be: SELECT A.VALUE, A.MODIFIEDTIME, A.CREATEDTIME, A.RECID FROM HINTTABLE A(NOLOCK) WHERE (PURCHID=”EN00009″) OPTION(FAST 47) Conversely, using ForcePlaceHolders in Axapta, Axapta […]

mkDate in AX

Hi, Creates a date based on three integers, which indicate the day, month, and year, respectively. date mkDate(int day, int month, int year) Example static void mkDateExample(Args _arg) { date d; ; // Returns the date 0112005. d = mkDate(1, 1, 2005); print d; pause; }

Color code for AX

Color  Code type Blue Green Dark Red Bright Red Purple Black Reserved words Comments Strings Numbers Labels Everything else

Select Statement Syntax for AX

SelectStatement = select Parameters Parameters [ [ FindOptions ] [ FieldList from ] ] TableBufferVariable [ IndexClause ]  [ Options ] [ WhereClause ] [ JoinClause ] FindOptions = crossCompany | reverse | firstFast | [ firstOnly | firstOnly10 | firstOnly100  | firstOnly1000 ] | forUpdate | noFetch | [forcePlaceholders | forceLiterals] |forceselectorder | forceNestedLoop  | repeatableRead FieldList = Field { , Field } | * Field = Aggregate ( FieldIdentifier ) | FieldIdentifier Aggregate = sum | avg | minof | maxof | count Options = [ order by , group by , FieldIdentifier [ asc | desc ] { , FieldIdentifier [ asc | desc ] }] | [ IndexClause ] IndexClause = index IndexName | index hint IndexName WhereClause = where Expression JoinClause = [exists | notexists | outer ] join Parameters Keywords Used […]