Skip to main content

Posts

steps to debug standard Forms and class in Microsoft dynamics ax 2012

It depends on your requirement. If its list page form then you can debug it in its interaction class. If its normal form then follow these points. 1. Enable debugging in server configuration 2. Press F9 on the line of code you want to debug 3. You can also write break point keyword on the line of code you want to debug. 4. Restart the form 5. To debug line by line you can press F10 if you want to debug sub method then you can press F11.

Difference between run and main method in Microsoft dynamics ax 2012

Main is the entry point of a class, you can use it as a constructor method of your class, depending on the argument you can instantiate a new child class and return it's object. Run is used to write the code to process the business logic for that class In addition to that, Main is recognized by kernel and is executed when you call that class from the Menu item. On the other hand, Run is just a user defined method that by design should be used to execute the main job of the class.

Surrogate key in Axapta

A surrogate key is an artificial value that has no meaning to the user, but is guaranteed to be unique by the database itself.  Surrogate key is like an Index defined by the application.And RecId is automatically populated by ax for reference purpose in table level.If you didn't specify any primary index then system will specify one default index called surrogate key. If You did not defined any index for the table directly take recid as surrogate key.

Code to Create journal in ax 2012

Table group,Type,System,shared table in Ax 2012

->> Table group. The TableGroup property of a table can be used to choose tables to include in definition groups for export.   It can also be used to determining  which types of tables should be held in the record cache. ->> Table type. The  TableType property of a table determines where the table is stored. The options are:    --->> Regular: stored in the Microsoft Dynamics AX database.    --->> TempDB: stored in the TempDB database.  When you restart an Application Object Server instance or database, all  tables in the TempDB database are dropped and recreated.   -- ->> InMemory: held in memory only during the current Microsoft Dynamics AX session. ->> System table. A table that is used by the Microsoft Dynamics AX system, not for customer data. ->> Visible. A table that is visible in the AOT. ->> Shared (SaveDataPerCompany = No). Shared tables are used by multiple companies. Tables that are not shared pertain   to a single

How to get AOT element in current layer by code in axapta

To get AOT element in current layer by code in axapta you can  get help from below code. You can get other layer element by change enum value of utillevel. UtilElements _UtilElements; while select _UtilElements where _UtilElements.recordType == UtilElementType::ExtendedType && _UtilElements.utilLevel == global::currentAOLayer() { info(strfmt("%1",_UtilElements.name)) ; }